diff options
author | Christoph Hellwig <hch@lst.de> | 2020-11-26 10:41:07 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-12-01 14:53:40 -0700 |
commit | 977115c0f664e016a6b2774d4f97116ade23d732 (patch) | |
tree | 1fec5aa76caa573bdc71d4731aa5b18b959a3aa3 /fs/block_dev.c | |
parent | 0d02129e76edf91cf04fabf1efbc3a9a1f1d729a (diff) |
block: stop using bdget_disk for partition 0
We can just dereference the point in struct gendisk instead. Also
remove the now unused export.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index a9905d8fd02b..9e56ee1f2652 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1299,7 +1299,7 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode) if (ret) return ret; } else { - struct block_device *whole = bdget_disk(disk, 0); + struct block_device *whole = bdgrab(disk->part0); mutex_lock_nested(&whole->bd_mutex, 1); ret = __blkdev_get(whole, mode); |