X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=block%2Fcompat_ioctl.c;h=58c6ee5b010c4fd4a22206e9c88c5cadedc1a1a2;hb=HEAD;hp=119f07b74dc0c41d99c282c1299a80f5f0dfc8c0;hpb=75a1e32cce30ab1c5a361ebae24a18753e42feaa;p=net-next-2.6.git diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c index 119f07b74dc..58c6ee5b010 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) bdi->ra_pages = (arg * 512) / PAGE_CACHE_SIZE; return 0; case BLKGETSIZE: - size = bdev->bd_inode->i_size; + size = i_size_read(bdev->bd_inode); if ((size >> 9) > ~0UL) return -EFBIG; return compat_put_ulong(arg, size >> 9); case BLKGETSIZE64_32: - return compat_put_u64(arg, bdev->bd_inode->i_size); + return compat_put_u64(arg, i_size_read(bdev->bd_inode)); case BLKTRACESETUP32: case BLKTRACESTART: /* compatible */