diff options
author | Christoph Hellwig <hch@lst.de> | 2021-07-22 09:54:01 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-02 13:37:28 -0600 |
commit | 14cf1dbb55bb07427babee425fd2a8a9300737cc (patch) | |
tree | f5803e1069548c98e4dccb3087606569605e5916 /fs/block_dev.c | |
parent | 4b2731226d7de4302e4d8766c86e3a21c56dc3b1 (diff) | |
download | linux-14cf1dbb55bb07427babee425fd2a8a9300737cc.tar.bz2 |
block: remove bdgrab
All callers are gone, and no one should grab a pure inode reference to
a block device anymore.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Link: https://lore.kernel.org/r/20210722075402.983367-9-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 4a6c8c0a3bc9..4f2c4e9e84f5 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -921,21 +921,6 @@ void bdev_add(struct block_device *bdev, dev_t dev) insert_inode_hash(bdev->bd_inode); } -/** - * bdgrab -- Grab a reference to an already referenced block device - * @bdev: Block device to grab a reference to. - * - * Returns the block_device with an additional reference when successful, - * or NULL if the inode is already beeing freed. - */ -struct block_device *bdgrab(struct block_device *bdev) -{ - if (!igrab(bdev->bd_inode)) - return NULL; - return bdev; -} -EXPORT_SYMBOL(bdgrab); - long nr_blockdev_pages(void) { struct inode *inode; |