diff options
Diffstat (limited to 'block/compat_ioctl.c')
-rw-r--r-- | block/compat_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c index f678c733df40..556826ac7cb4 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c | |||
@@ -710,7 +710,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) | |||
710 | return -EINVAL; | 710 | return -EINVAL; |
711 | bdi = blk_get_backing_dev_info(bdev); | 711 | bdi = blk_get_backing_dev_info(bdev); |
712 | return compat_put_long(arg, | 712 | return compat_put_long(arg, |
713 | (bdi->ra_pages * PAGE_CACHE_SIZE) / 512); | 713 | (bdi->ra_pages * PAGE_SIZE) / 512); |
714 | case BLKROGET: /* compatible */ | 714 | case BLKROGET: /* compatible */ |
715 | return compat_put_int(arg, bdev_read_only(bdev) != 0); | 715 | return compat_put_int(arg, bdev_read_only(bdev) != 0); |
716 | case BLKBSZGET_32: /* get the logical block size (cf. BLKSSZGET) */ | 716 | case BLKBSZGET_32: /* get the logical block size (cf. BLKSSZGET) */ |
@@ -729,7 +729,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) | |||
729 | if (!capable(CAP_SYS_ADMIN)) | 729 | if (!capable(CAP_SYS_ADMIN)) |
730 | return -EACCES; | 730 | return -EACCES; |
731 | bdi = blk_get_backing_dev_info(bdev); | 731 | bdi = blk_get_backing_dev_info(bdev); |
732 | bdi->ra_pages = (arg * 512) / PAGE_CACHE_SIZE; | 732 | bdi->ra_pages = (arg * 512) / PAGE_SIZE; |
733 | return 0; | 733 | return 0; |
734 | case BLKGETSIZE: | 734 | case BLKGETSIZE: |
735 | size = i_size_read(bdev->bd_inode); | 735 | size = i_size_read(bdev->bd_inode); |