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) |
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 | |||
92 | int cow = mod != 0; | 92 | int cow = mod != 0; |
93 | struct btrfs_disk_key *found_key; | 93 | struct btrfs_disk_key *found_key; |
94 | struct btrfs_leaf *leaf; | 94 | struct btrfs_leaf *leaf; |
95 | u32 overflow; | ||
95 | 96 | ||
96 | key.objectid = dir; | 97 | key.objectid = dir; |
97 | key.flags = 0; | 98 | key.flags = 0; |
@@ -119,8 +120,10 @@ int btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root | |||
119 | if (btrfs_match_dir_item_name(root, path, name, name_len)) | 120 | if (btrfs_match_dir_item_name(root, path, name, name_len)) |
120 | return 0; | 121 | return 0; |
121 | 122 | ||
122 | if (btrfs_disk_key_overflow(found_key) == 0) | 123 | overflow = btrfs_disk_key_overflow(found_key); |
124 | if (overflow == 0) | ||
123 | return 1; | 125 | return 1; |
126 | btrfs_set_key_overflow(&key, overflow - 1); | ||
124 | btrfs_release_path(root, path); | 127 | btrfs_release_path(root, path); |
125 | } | 128 | } |
126 | return 1; | 129 | return 1; |