[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 73/78] block: use put_device in put_disk
- To: Jens Axboe <axboe@xxxxxxxxx>
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Mon, 16 Nov 2020 15:58:04 +0100
- Cc: Justin Sanders <justin@xxxxxxxxxx>, Josef Bacik <josef@xxxxxxxxxxxxxx>, Ilya Dryomov <idryomov@xxxxxxxxx>, Jack Wang <jinpu.wang@xxxxxxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Jason Wang <jasowang@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Stefan Hajnoczi <stefanha@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Minchan Kim <minchan@xxxxxxxxxx>, Mike Snitzer <snitzer@xxxxxxxxxx>, Song Liu <song@xxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, dm-devel@xxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, nbd@xxxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
- Delivery-date: Mon, 16 Nov 2020 15:12:10 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Use put_device to put the device instead of poking into the internals
and using kobject_put.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
block/genhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/genhd.c b/block/genhd.c
index 56bc37e98ed852..f1e20ec1b62887 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1659,7 +1659,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);
--
2.29.2
|