summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-05 12:13:21 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-05 12:13:21 -0400
commit7fcde0e3298c00ee18e2ae7f01c67f99133ef7be (patch)
tree61aea37ce9e0e78762459e6fd4b3a2155d892e7f /fs/btrfs/super.c
parent5f26f772e5c4e833ffcb0599f54deda466d2a3e5 (diff)
Btrfs: finish off inode indexing in dirs, add overflows
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index d776b29a167..4fd2b168b2c 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -486,19 +486,18 @@ static int btrfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
continue;
if (btrfs_disk_key_offset(&item->key) < filp->f_pos)
continue;
-
+ filp->f_pos = btrfs_disk_key_offset(&item->key);
advance = 1;
di = btrfs_item_ptr(leaf, slot, struct btrfs_dir_item);
over = filldir(dirent, (const char *)(di + 1),
btrfs_dir_name_len(di),
btrfs_disk_key_offset(&item->key),
btrfs_dir_objectid(di), d_type);
- if (over) {
- filp->f_pos = btrfs_disk_key_offset(&item->key);
- break;
- }
- filp->f_pos = btrfs_disk_key_offset(&item->key) + 1;
+ if (over)
+ goto nopos;
}
+ filp->f_pos++;
+nopos:
ret = 0;
err:
btrfs_release_path(root, path);