@@ -1077,7 +1077,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",
@@ -1262,7 +1262,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;
@@ -262,7 +262,7 @@ static void part_release(struct device *dev)
if (MAJOR(dev->devt) == BLOCK_EXT_MAJOR)
blk_free_ext_minor(MINOR(dev->devt));
put_disk(dev_to_bdev(dev)->bd_disk);
- bdput(dev_to_bdev(dev));
+ iput(dev_to_bdev(dev)->bd_inode);
}
static int part_uevent(struct device *dev, struct kobj_uevent_env *env)
@@ -934,12 +934,6 @@ long nr_blockdev_pages(void)
return ret;
}
-void bdput(struct block_device *bdev)
-{
- iput(bdev->bd_inode);
-}
-EXPORT_SYMBOL(bdput);
-
/**
* bd_may_claim - test whether a block device can be claimed
* @bdev: block device of interest
@@ -1984,7 +1984,6 @@ void blkdev_put_no_open(struct block_device *bdev);
struct block_device *bdev_alloc(struct gendisk *disk, u8 partno);
void bdev_add(struct block_device *bdev, dev_t dev);
struct block_device *I_BDEV(struct inode *inode);
-void bdput(struct block_device *);
int truncate_bdev_range(struct block_device *bdev, fmode_t mode, loff_t lstart,
loff_t lend);