Commit efdc41c8 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: use put_device in put_disk

Use put_device to put the device instead of poking into the internals
and using kobject_put.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e79319af
......@@ -1803,7 +1803,7 @@ EXPORT_SYMBOL(__alloc_disk_node);
void put_disk(struct gendisk *disk)
{
if (disk)
kobject_put(&disk_to_dev(disk)->kobj);
put_device(disk_to_dev(disk));
}
EXPORT_SYMBOL(put_disk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment