diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-06-23 21:35:17 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2010-06-23 21:35:17 -0400 |
commit | 7b6259e7a83647948fa33a736cc832310c8d85aa (patch) | |
tree | 99bb872b179a93f5e32b51f312029abb1237b055 /fs/xfs/linux-2.6/xfs_ioctl32.c | |
parent | 1920779e67cbf5ea8afef317777c5bf2b8096188 (diff) |
xfs: remove block number from inode lookup code
The block number comes from bulkstat based inode lookups to shortcut
the mapping calculations. We ar enot able to trust anything from
bulkstat, so drop the block number as well so that the correct
lookups and mappings are always done.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl32.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl32.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index e1d8380b049d..52ed49e6465c 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c | |||
@@ -237,12 +237,11 @@ xfs_bulkstat_one_compat( | |||
237 | xfs_ino_t ino, /* inode number to get data for */ | 237 | xfs_ino_t ino, /* inode number to get data for */ |
238 | void __user *buffer, /* buffer to place output in */ | 238 | void __user *buffer, /* buffer to place output in */ |
239 | int ubsize, /* size of buffer */ | 239 | int ubsize, /* size of buffer */ |
240 | xfs_daddr_t bno, /* starting bno of inode cluster */ | ||
241 | int *ubused, /* bytes used by me */ | 240 | int *ubused, /* bytes used by me */ |
242 | int *stat) /* BULKSTAT_RV_... */ | 241 | int *stat) /* BULKSTAT_RV_... */ |
243 | { | 242 | { |
244 | return xfs_bulkstat_one_int(mp, ino, buffer, ubsize, | 243 | return xfs_bulkstat_one_int(mp, ino, buffer, ubsize, |
245 | xfs_bulkstat_one_fmt_compat, bno, | 244 | xfs_bulkstat_one_fmt_compat, |
246 | ubused, stat); | 245 | ubused, stat); |
247 | } | 246 | } |
248 | 247 | ||
@@ -296,7 +295,7 @@ xfs_compat_ioc_bulkstat( | |||
296 | int res; | 295 | int res; |
297 | 296 | ||
298 | error = xfs_bulkstat_one_compat(mp, inlast, bulkreq.ubuffer, | 297 | error = xfs_bulkstat_one_compat(mp, inlast, bulkreq.ubuffer, |
299 | sizeof(compat_xfs_bstat_t), 0, NULL, &res); | 298 | sizeof(compat_xfs_bstat_t), 0, &res); |
300 | } else if (cmd == XFS_IOC_FSBULKSTAT_32) { | 299 | } else if (cmd == XFS_IOC_FSBULKSTAT_32) { |
301 | error = xfs_bulkstat(mp, &inlast, &count, | 300 | error = xfs_bulkstat(mp, &inlast, &count, |
302 | xfs_bulkstat_one_compat, sizeof(compat_xfs_bstat_t), | 301 | xfs_bulkstat_one_compat, sizeof(compat_xfs_bstat_t), |