]> Git Repo - linux.git/commitdiff
block: use put_device in put_disk
authorChristoph Hellwig <[email protected]>
Tue, 10 Nov 2020 06:25:37 +0000 (07:25 +0100)
committerJens Axboe <[email protected]>
Tue, 1 Dec 2020 21:53:39 +0000 (14:53 -0700)
Use put_device to put the device instead of poking into the internals
and using kobject_put.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
block/genhd.c

index 0bd9c41dd4cb69c478da3293b723706f35d3a99b..f46e89226fdf916566eee60f020f49a4c94a4e02 100644 (file)
@@ -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);
 
This page took 0.059837 seconds and 4 git commands to generate.