aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dir-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/dir-test.c')
-rw-r--r--fs/btrfs/dir-test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/dir-test.c b/fs/btrfs/dir-test.c
index b482b8f49f8a..f73aa7623398 100644
--- a/fs/btrfs/dir-test.c
+++ b/fs/btrfs/dir-test.c
@@ -81,8 +81,7 @@ error:
81 di = btrfs_item_ptr(&path.nodes[0]->leaf, path.slots[0], 81 di = btrfs_item_ptr(&path.nodes[0]->leaf, path.slots[0],
82 struct btrfs_dir_item); 82 struct btrfs_dir_item);
83 found = (char *)(di + 1); 83 found = (char *)(di + 1);
84 found_len = btrfs_dir_name_len(path.nodes[0]->leaf.items + 84 found_len = btrfs_dir_name_len(di);
85 path.slots[0]);
86 btrfs_name_hash(buf, strlen(buf), &myhash); 85 btrfs_name_hash(buf, strlen(buf), &myhash);
87 btrfs_name_hash(found, found_len, &foundhash); 86 btrfs_name_hash(found, found_len, &foundhash);
88 if (myhash != foundhash) 87 if (myhash != foundhash)
@@ -227,8 +226,7 @@ static int empty_tree(struct btrfs_root *root, struct radix_tree_root *radix,
227 slot = path.slots[0]; 226 slot = path.slots[0];
228 di = btrfs_item_ptr(&path.nodes[0]->leaf, slot, 227 di = btrfs_item_ptr(&path.nodes[0]->leaf, slot,
229 struct btrfs_dir_item); 228 struct btrfs_dir_item);
230 found_len = btrfs_dir_name_len(path.nodes[0]->leaf.items + 229 found_len = btrfs_dir_name_len(di);
231 slot);
232 memcpy(buf, (char *)(di + 1), found_len); 230 memcpy(buf, (char *)(di + 1), found_len);
233 BUG_ON(found_len > 128); 231 BUG_ON(found_len > 128);
234 buf[found_len] = '\0'; 232 buf[found_len] = '\0';