Skip to content

Commit

Permalink
Btrfs: Fix looping on readdir of the subvol roots
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Yan Zheng authored and Chris Mason committed Sep 25, 2008
1 parent 0762704 commit 5e591a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,10 @@ static int btrfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
di = (struct btrfs_dir_item *)((char *)di + di_len);
}
}
filp->f_pos = INT_LIMIT(typeof(filp->f_pos));
if (key_type == BTRFS_DIR_INDEX_KEY)
filp->f_pos = INT_LIMIT(typeof(filp->f_pos));
else
filp->f_pos++;
nopos:
ret = 0;
err:
Expand Down

0 comments on commit 5e591a0

Please sign in to comment.