commit | 5e591a0703bc03047d37938586f97fd8ca960c08 | [log] [tgz] |
---|---|---|
author | Yan Zheng <yanzheng@21cn.com> | Tue Feb 19 11:41:02 2008 -0500 |
committer | Chris Mason <chris.mason@oracle.com> | Thu Sep 25 11:04:00 2008 -0400 |
tree | 010c83864a48a34c78f9697bb0ab34d8a0fda4ba | |
parent | 0762704b196d41941a9b439e9165efaf85c6609e [diff] [blame] |
Btrfs: Fix looping on readdir of the subvol roots Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 913ab12..3e79572 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c
@@ -1465,7 +1465,10 @@ 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: