* [PATCH] blk-fs: put dev->kobj in blk_register_queue fail path
@ 2010-08-13 10:44 Xiaotian Feng
2010-08-23 10:31 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Xiaotian Feng @ 2010-08-13 10:44 UTC (permalink / raw)
To: linux-kernel
Cc: Xiaotian Feng, Jens Axboe, Martin K. Petersen, Stephen Hemminger,
Nikanth Karthikesan, David Teigland
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] blk-fs: put dev->kobj in blk_register_queue fail path
2010-08-13 10:44 [PATCH] blk-fs: put dev->kobj in blk_register_queue fail path Xiaotian Feng
@ 2010-08-23 10:31 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2010-08-23 10:31 UTC (permalink / raw)
To: Xiaotian Feng
Cc: linux-kernel, Martin K. Petersen, Stephen Hemminger,
Nikanth Karthikesan, David Teigland
On 2010-08-13 12:44, Xiaotian Feng wrote:
> 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;
> }
>
Looks correct. Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-23 10:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-13 10:44 [PATCH] blk-fs: put dev->kobj in blk_register_queue fail path Xiaotian Feng
2010-08-23 10:31 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox