summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/block_dev.c2
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);