diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-04-05 12:13:21 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-04-05 12:13:21 -0400 |
commit | 7fcde0e3298c00ee18e2ae7f01c67f99133ef7be (patch) | |
tree | 61aea37ce9e0e78762459e6fd4b3a2155d892e7f /fs/btrfs/super.c | |
parent | 5f26f772e5c4e833ffcb0599f54deda466d2a3e5 (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.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index d776b29a1676..4fd2b168b2c4 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) | |||
486 | continue; | 486 | continue; |
487 | if (btrfs_disk_key_offset(&item->key) < filp->f_pos) | 487 | if (btrfs_disk_key_offset(&item->key) < filp->f_pos) |
488 | continue; | 488 | continue; |
489 | 489 | filp->f_pos = btrfs_disk_key_offset(&item->key); | |
490 | advance = 1; | 490 | advance = 1; |
491 | di = btrfs_item_ptr(leaf, slot, struct btrfs_dir_item); | 491 | di = btrfs_item_ptr(leaf, slot, struct btrfs_dir_item); |
492 | over = filldir(dirent, (const char *)(di + 1), | 492 | over = filldir(dirent, (const char *)(di + 1), |
493 | btrfs_dir_name_len(di), | 493 | btrfs_dir_name_len(di), |
494 | btrfs_disk_key_offset(&item->key), | 494 | btrfs_disk_key_offset(&item->key), |
495 | btrfs_dir_objectid(di), d_type); | 495 | btrfs_dir_objectid(di), d_type); |
496 | if (over) { | 496 | if (over) |
497 | filp->f_pos = btrfs_disk_key_offset(&item->key); | 497 | goto nopos; |
498 | break; | ||
499 | } | ||
500 | filp->f_pos = btrfs_disk_key_offset(&item->key) + 1; | ||
501 | } | 498 | } |
499 | filp->f_pos++; | ||
500 | nopos: | ||
502 | ret = 0; | 501 | ret = 0; |
503 | err: | 502 | err: |
504 | btrfs_release_path(root, path); | 503 | btrfs_release_path(root, path); |