[XFS] Put the correct offset in dirent d_off
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Tue, 18 Dec 2007 05:19:34 +0000 (16:19 +1100)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Tue, 18 Dec 2007 06:16:23 +0000 (17:16 +1100)
commit041388b54ed95cd169546bd83bacd08ee32bd7ea
treef457ee15545f6fbed0b0d5b8edd772c8ef7354e5
parentc734c79bc397eace039bea406997efa89f879c14
[XFS] Put the correct offset in dirent d_off

The recent filldir regression fix was not putting the correct d_off in
each dirent. This was resulting in incorrect cookies being passed to dmapi
ioctls and the wrong offset appearing in the dirents. readdir was
unaffected as the filp->f_pos was being updated with the correct offset
and this was being written into the last dirent in each buffer. Fix the
XFS code to do the right thing.

SGI-PV: 973746
SGI-Modid: xfs-linux-melb:xfs-kern:30240a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/linux-2.6/xfs_file.c
fs/xfs/xfs_dir2_block.c
fs/xfs/xfs_dir2_leaf.c
fs/xfs/xfs_dir2_sf.c