Skip to content

Commit

Permalink
block: put dev->kobj in blk_register_queue fail path
Browse files Browse the repository at this point in the history
kernel needs to kobject_put on dev->kobj if elv_register_queue fails.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
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>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
Xiaotian Feng authored and Jens Axboe committed Aug 23, 2010
1 parent 4ee6985 commit c87ffbb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/blk-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c87ffbb

Please sign in to comment.