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 119f07b74dc0..58c6ee5b010c 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c | |||
@@ -744,13 +744,13 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) | |||
744 | bdi->ra_pages = (arg * 512) / PAGE_CACHE_SIZE; | 744 | bdi->ra_pages = (arg * 512) / PAGE_CACHE_SIZE; |
745 | return 0; | 745 | return 0; |
746 | case BLKGETSIZE: | 746 | case BLKGETSIZE: |
747 | size = bdev->bd_inode->i_size; | 747 | size = i_size_read(bdev->bd_inode); |
748 | if ((size >> 9) > ~0UL) | 748 | if ((size >> 9) > ~0UL) |
749 | return -EFBIG; | 749 | return -EFBIG; |
750 | return compat_put_ulong(arg, size >> 9); | 750 | return compat_put_ulong(arg, size >> 9); |
751 | 751 | ||
752 | case BLKGETSIZE64_32: | 752 | case BLKGETSIZE64_32: |
753 | return compat_put_u64(arg, bdev->bd_inode->i_size); | 753 | return compat_put_u64(arg, i_size_read(bdev->bd_inode)); |
754 | 754 | ||
755 | case BLKTRACESETUP32: | 755 | case BLKTRACESETUP32: |
756 | case BLKTRACESTART: /* compatible */ | 756 | case BLKTRACESTART: /* compatible */ |