[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070630031013.GC4045@APFDCB5C>
Date: Sat, 30 Jun 2007 12:10:13 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <jens.axboe@...cle.com>
Subject: [PATCH 1/4] void unregister_blkdev - do WARN_ON failure
When unregister_blkdev() has failed, something wrong happened.
This patch adds WARN_ON to notify such badness.
Cc: Jens Axboe <jens.axboe@...cle.com>
Signed-off-by: Akinobu Mita <akinobu.mita@...il.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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists