aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorYan Zheng <yanzheng@21cn.com>2008-02-19 11:41:02 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:00 -0400
commit5e591a0703bc03047d37938586f97fd8ca960c08 (patch)
tree010c83864a48a34c78f9697bb0ab34d8a0fda4ba /fs/btrfs/inode.c
parent0762704b196d41941a9b439e9165efaf85c6609e (diff)
Btrfs: Fix looping on readdir of the subvol roots
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 913ab128eee1..3e79572a5cb1 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1465,7 +1465,10 @@ read_dir_items:
1465 di = (struct btrfs_dir_item *)((char *)di + di_len); 1465 di = (struct btrfs_dir_item *)((char *)di + di_len);
1466 } 1466 }
1467 } 1467 }
1468 filp->f_pos = INT_LIMIT(typeof(filp->f_pos)); 1468 if (key_type == BTRFS_DIR_INDEX_KEY)
1469 filp->f_pos = INT_LIMIT(typeof(filp->f_pos));
1470 else
1471 filp->f_pos++;
1469nopos: 1472nopos:
1470 ret = 0; 1473 ret = 0;
1471err: 1474err: