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.
Unified · Split
| @@ -1076,7 +1076,7 @@ static void disk_release(struct device *dev) · 1075 unmodified lines | ||
| 1076 | 1076 | xa_destroy(&disk->part_tbl); |
| 1077 | 1077 | if (test_bit(GD_QUEUE_REF, &disk->state) && disk->queue) |
| 1078 | 1078 | blk_put_queue(disk->queue); |
| 1079 | − bdput(disk->part0); /* frees the disk */ | |
| 1079 | + iput(disk->part0->bd_inode); /* frees the disk */ | |
| 1080 | 1080 | } |
| 1081 | 1081 | struct class block_class = { |
| 1082 | 1082 | .name = "block", |
| @@ -1261,7 +1261,7 @@ struct gendisk *__alloc_disk_node(int minors, int node_id) · 178 unmodified lines | ||
| 1261 | 1261 | |
| 1262 | 1262 | out_destroy_part_tbl: |
| 1263 | 1263 | xa_destroy(&disk->part_tbl); |
| 1264 | − bdput(disk->part0); | |
| 1264 | + iput(disk->part0->bd_inode); | |
| 1265 | 1265 | out_free_disk: |
| 1266 | 1266 | kfree(disk); |
| 1267 | 1267 | return NULL; |
| @@ -262,7 +262,7 @@ static void part_release(struct device *dev) · 261 unmodified lines | ||
| 262 | 262 | if (MAJOR(dev->devt) == BLOCK_EXT_MAJOR) |
| 263 | 263 | blk_free_ext_minor(MINOR(dev->devt)); |
| 264 | 264 | put_disk(dev_to_bdev(dev)->bd_disk); |
| 265 | − bdput(dev_to_bdev(dev)); | |
| 265 | + iput(dev_to_bdev(dev)->bd_inode); | |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | static int part_uevent(struct device *dev, struct kobj_uevent_env *env) |
| @@ -934,12 +934,6 @@ long nr_blockdev_pages(void) · 933 unmodified lines | ||
| 934 | 934 | return ret; |
| 935 | 935 | } |
| 936 | 936 | |
| 937 | −void bdput(struct block_device *bdev) | |
| 938 | −{ | |
| 939 | − iput(bdev->bd_inode); | |
| 940 | −} | |
| 941 | −EXPORT_SYMBOL(bdput); | |
| 942 | − | |
| 943 | 937 | /** |
| 944 | 938 | * bd_may_claim - test whether a block device can be claimed |
| 945 | 939 | * @bdev: block device of interest |
| @@ -1984,7 +1984,6 @@ void blkdev_put_no_open(struct block_device *bdev); · 1983 unmodified lines | ||
| 1984 | 1984 | struct block_device *bdev_alloc(struct gendisk *disk, u8 partno); |
| 1985 | 1985 | void bdev_add(struct block_device *bdev, dev_t dev); |
| 1986 | 1986 | struct block_device *I_BDEV(struct inode *inode); |
| 1987 | −void bdput(struct block_device *); | |
| 1988 | 1987 | int truncate_bdev_range(struct block_device *bdev, fmode_t mode, loff_t lstart, |
| 1989 | 1988 | loff_t lend); |
| 1990 | 1989 | |