summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/fops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/fops.c b/block/fops.c
index 2c43e493e37c..2ae8a7bd2b84 100644
--- a/block/fops.c
+++ b/block/fops.c
@@ -535,7 +535,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) {