summaryrefslogtreecommitdiff
path: root/block/fops.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/fops.c')
-rw-r--r--block/fops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/fops.c b/block/fops.c
index a2f492e50782..3777c7b76eae 100644
--- a/block/fops.c
+++ b/block/fops.c
@@ -605,7 +605,7 @@ static long blkdev_fallocate(struct file *file, int mode, loff_t start,
return -EOPNOTSUPP;
/* Don't go off the end of the device. */
- isize = i_size_read(bdev->bd_inode);
+ isize = bdev_nr_bytes(bdev);
if (start >= isize)
return -EINVAL;
if (end >= isize) {