diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-04-05 13:35:25 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-04-05 13:35:25 -0400 |
commit | 5be6f7f174146d91039a27ebb2f1b4ac599172b3 (patch) | |
tree | 2933d1e9e5cb50c4ca93f6e8c7e133d65a614461 /fs/btrfs/dir-item.c | |
parent | 7fcde0e3298c00ee18e2ae7f01c67f99133ef7be (diff) | |
download | blackbird-op-linux-5be6f7f174146d91039a27ebb2f1b4ac599172b3.tar.gz blackbird-op-linux-5be6f7f174146d91039a27ebb2f1b4ac599172b3.zip |
Btrfs: dirindex optimizations
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/dir-item.c')
-rw-r--r-- | fs/btrfs/dir-item.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c index b1629a5d73c8..0ee9945fb1b0 100644 --- a/fs/btrfs/dir-item.c +++ b/fs/btrfs/dir-item.c @@ -92,6 +92,7 @@ int btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root int cow = mod != 0; struct btrfs_disk_key *found_key; struct btrfs_leaf *leaf; + u32 overflow; key.objectid = dir; key.flags = 0; @@ -119,8 +120,10 @@ int btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root if (btrfs_match_dir_item_name(root, path, name, name_len)) return 0; - if (btrfs_disk_key_overflow(found_key) == 0) + overflow = btrfs_disk_key_overflow(found_key); + if (overflow == 0) return 1; + btrfs_set_key_overflow(&key, overflow - 1); btrfs_release_path(root, path); } return 1; |