diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2007-12-18 16:19:34 +1100 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2007-12-18 17:16:23 +1100 |
commit | 041388b54ed95cd169546bd83bacd08ee32bd7ea (patch) | |
tree | f457ee15545f6fbed0b0d5b8edd772c8ef7354e5 /fs/xfs/linux-2.6/xfs_file.c | |
parent | c734c79bc397eace039bea406997efa89f879c14 (diff) | |
download | kernel_samsung_tuna-041388b54ed95cd169546bd83bacd08ee32bd7ea.zip kernel_samsung_tuna-041388b54ed95cd169546bd83bacd08ee32bd7ea.tar.gz kernel_samsung_tuna-041388b54ed95cd169546bd83bacd08ee32bd7ea.tar.bz2 |
[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>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_file.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 54c5646..e1fcef2 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c @@ -356,13 +356,13 @@ xfs_file_readdir( reclen = sizeof(struct hack_dirent) + de->namlen; size -= reclen; - curr_offset = de->offset /* & 0x7fffffff */; de = (struct hack_dirent *)((char *)de + reclen); + curr_offset = de->offset /* & 0x7fffffff */; } } done: - if (!error) { + if (!error) { if (size == 0) filp->f_pos = offset & 0x7fffffff; else if (de) |