From: Xiaotian Feng <dfeng@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Xiaotian Feng <dfeng@redhat.com>, Jens Axboe <axboe@kernel.dk>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Stephen Hemminger <shemminger@vyatta.com>,
Nikanth Karthikesan <knikanth@suse.de>,
David Teigland <teigland@redhat.com>
Subject: [PATCH] blk-fs: put dev->kobj in blk_register_queue fail path
Date: Fri, 13 Aug 2010 18:44:52 +0800 [thread overview]
Message-ID: <1281696292-5746-1-git-send-email-dfeng@redhat.com> (raw)
kernel needs to kobject_put on dev->kobj if elv_register_queue fails.
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Nikanth Karthikesan <knikanth@suse.de>
Cc: David Teigland <teigland@redhat.com>
---
block/blk-sysfs.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 001ab18..0749b89 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -511,6 +511,7 @@ int blk_register_queue(struct gendisk *disk)
kobject_uevent(&q->kobj, KOBJ_REMOVE);
kobject_del(&q->kobj);
blk_trace_remove_sysfs(disk_to_dev(disk));
+ kobject_put(&dev->kobj);
return ret;
}
--
1.7.2.1
next reply other threads:[~2010-08-13 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-13 10:44 Xiaotian Feng [this message]
2010-08-23 10:31 ` [PATCH] blk-fs: put dev->kobj in blk_register_queue fail path Jens Axboe
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=1281696292-5746-1-git-send-email-dfeng@redhat.com \
--to=dfeng@redhat.com \
--cc=axboe@kernel.dk \
--cc=knikanth@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=shemminger@vyatta.com \
--cc=teigland@redhat.com \
/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