diff --git a/block/fops.c b/block/fops.c
index 2c43e493e37c656f943252073b081ada0035672b..2ae8a7bd2b84acada0156f10b175ab8710e5c94c 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) {