提交 efdc41c8 编写于 作者: C Christoph Hellwig 提交者: 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: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: NJan Kara <jack@suse.cz>
Reviewed-by: NHannes Reinecke <hare@suse.de>
Reviewed-by: NJohannes Thumshirn <johannes.thumshirn@wdc.com>
Acked-by: NTejun Heo <tj@kernel.org>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册