aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/block/genhd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-07-22 09:54:02 +0200
committerJens Axboe <axboe@kernel.dk>2021-08-02 13:37:28 -0600
commit2f4731dcd0bb73379fbb9e3eb07ae7324125caef (patch)
tree2b1a971a15bd396fd97d2fdc7c2a2b2a7848e0d6 /block/genhd.c
parentblock: remove bdgrab (diff)
downloadwireguard-linux-2f4731dcd0bb73379fbb9e3eb07ae7324125caef.tar.xz
wireguard-linux-2f4731dcd0bb73379fbb9e3eb07ae7324125caef.zip
block: remove bdput
Now that we've stopped using inode references for anything meaninful in the block layer get rid of the helper to put it and just open code the call to iput on the block_device inode. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Chaitanya Kulkarni <ckulkarnilinux@gmail.com> Link: https://lore.kernel.org/r/20210722075402.983367-10-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 716f5ca479ad..5dbb99b57b33 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1076,7 +1076,7 @@ static void disk_release(struct device *dev)
xa_destroy(&disk->part_tbl);
if (test_bit(GD_QUEUE_REF, &disk->state) && disk->queue)
blk_put_queue(disk->queue);
- bdput(disk->part0); /* frees the disk */
+ iput(disk->part0->bd_inode); /* frees the disk */
}
struct class block_class = {
.name = "block",
@@ -1261,7 +1261,7 @@ struct gendisk *__alloc_disk_node(int minors, int node_id)
out_destroy_part_tbl:
xa_destroy(&disk->part_tbl);
- bdput(disk->part0);
+ iput(disk->part0->bd_inode);
out_free_disk:
kfree(disk);
return NULL;