Commit:     4743e0ec1217fd00f57461ebdd7979d31af18700
Parent:     bad60fdd14df32459e31cc75ab681e4458bf25cf
Author:     Lachlan McIlroy <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 21 11:00:23 2007 +1100
Committer:  Lachlan McIlroy <[EMAIL PROTECTED]>
CommitDate: Fri Dec 21 11:40:05 2007 +1100

    [XFS] Initialise current offset in xfs_file_readdir correctly
    After reading the directory contents into the temporary buffer, we grab
    each dirent and pass it to filldir witht eh current offset of the dirent.
    The current offset was not being set for the first dirent in the temporary
    buffer, which coul dresult in bad offsets being set in the f_pos field
    result in looping and duplicate entries being returned from readdir.
    SGI-PV: 974905
    SGI-Modid: xfs-linux-melb:xfs-kern:30282a
    Signed-off-by: David Chinner <[EMAIL PROTECTED]>
    Signed-off-by: Tim Shimmin <[EMAIL PROTECTED]>
    Signed-off-by: Lachlan McIlroy <[EMAIL PROTECTED]>
 fs/xfs/linux-2.6/xfs_file.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index e1fcef2..4847eb8 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -347,6 +347,7 @@ xfs_file_readdir(
                size = buf.used;
                de = (struct hack_dirent *)buf.dirent;
+               curr_offset = de->offset /* & 0x7fffffff */;
                while (size > 0) {
                        if (filldir(dirent, de->name, de->namlen,
                                        curr_offset & 0x7fffffff,
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to