mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 22:24:11 +08:00
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: Christoph Hellwig <hch@lst.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
e79319af6d
commit
efdc41c8d4
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user