public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] void unregister_blkdev - do WARN_ON failure
@ 2007-06-30  3:10 Akinobu Mita
  2007-06-30  3:12 ` [PATCH 2/4] void unregister_blkdev - delete redundant messages Akinobu Mita
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Akinobu Mita @ 2007-06-30  3:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jens Axboe

When unregister_blkdev() has failed, something wrong happened.
This patch adds WARN_ON to notify such badness.

Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>

---
 block/genhd.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: 2.6-mm/block/genhd.c
===================================================================
--- 2.6-mm.orig/block/genhd.c
+++ 2.6-mm/block/genhd.c
@@ -120,9 +120,10 @@ int unregister_blkdev(unsigned int major
 	for (n = &major_names[index]; *n; n = &(*n)->next)
 		if ((*n)->major == major)
 			break;
-	if (!*n || strcmp((*n)->name, name))
+	if (!*n || strcmp((*n)->name, name)) {
+		WARN_ON(1);
 		ret = -EINVAL;
-	else {
+	} else {
 		p = *n;
 		*n = p->next;
 	}

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-06-30 14:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-30  3:10 [PATCH 1/4] void unregister_blkdev - do WARN_ON failure Akinobu Mita
2007-06-30  3:12 ` [PATCH 2/4] void unregister_blkdev - delete redundant messages Akinobu Mita
2007-06-30  3:13   ` [PATCH 2/4 -mm] void unregister_blkdev - delete redundant message Akinobu Mita
2007-06-30  6:15     ` Grant Likely
2007-06-30  6:14   ` [PATCH 2/4] void unregister_blkdev - delete redundant messages Grant Likely
2007-06-30 14:08     ` Akinobu Mita
2007-06-30 14:12       ` Grant Likely
2007-06-30  3:15 ` [PATCH 3/4] void unregister_blkdev - ignore the return value Akinobu Mita
2007-06-30  3:17 ` [PATCH 4/4] void unregister_blkdev - make void Akinobu Mita

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox