From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Jens Axboe <jens.axboe@oracle.com>
Subject: [PATCH 1/4] void unregister_blkdev - do WARN_ON failure
Date: Sat, 30 Jun 2007 12:10:13 +0900 [thread overview]
Message-ID: <20070630031013.GC4045@APFDCB5C> (raw)
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;
}
next reply other threads:[~2007-06-30 3:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-30 3:10 Akinobu Mita [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070630031013.GC4045@APFDCB5C \
--to=akinobu.mita@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox