btrfs-progs: remove root argument from btrfs_fixup_low_keys

It's not used, so just remove it.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Nikolay Borisov 2021-09-14 12:05:52 +03:00 committed by David Sterba
parent dad03fac3b
commit 7c58b09548
3 changed files with 15 additions and 18 deletions

View File

@ -4196,8 +4196,7 @@ static int swap_values(struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_disk_key key;
btrfs_node_key(buf, &key, 0);
btrfs_fixup_low_keys(root, path, &key,
btrfs_header_level(buf) + 1);
btrfs_fixup_low_keys(path, &key, btrfs_header_level(buf) + 1);
}
} else {
struct btrfs_item *item1, *item2;
@ -4301,7 +4300,7 @@ static int delete_bogus_item(struct btrfs_root *root,
struct btrfs_disk_key disk_key;
btrfs_item_key(buf, &disk_key, 0);
btrfs_fixup_low_keys(root, path, &disk_key, 1);
btrfs_fixup_low_keys(path, &disk_key, 1);
}
btrfs_mark_buffer_dirty(buf);
return 0;

View File

@ -1505,8 +1505,8 @@ again:
* fixing up pointers when a given leaf/node is not in slot 0 of the
* higher levels
*/
void btrfs_fixup_low_keys(struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_disk_key *key, int level)
void btrfs_fixup_low_keys( struct btrfs_path *path, struct btrfs_disk_key *key,
int level)
{
int i;
struct extent_buffer *t;
@ -1553,7 +1553,7 @@ int btrfs_set_item_key_safe(struct btrfs_root *root, struct btrfs_path *path,
btrfs_set_item_key(eb, &disk_key, slot);
btrfs_mark_buffer_dirty(eb);
if (slot == 0)
btrfs_fixup_low_keys(root, path, &disk_key, 1);
btrfs_fixup_low_keys(path, &disk_key, 1);
return 0;
}
@ -1576,7 +1576,7 @@ void btrfs_set_item_key_unsafe(struct btrfs_root *root,
btrfs_set_item_key(eb, &disk_key, slot);
btrfs_mark_buffer_dirty(eb);
if (slot == 0)
btrfs_fixup_low_keys(root, path, &disk_key, 1);
btrfs_fixup_low_keys(path, &disk_key, 1);
}
/*
@ -2252,7 +2252,7 @@ static int push_leaf_left(struct btrfs_trans_handle *trans, struct btrfs_root
btrfs_mark_buffer_dirty(right);
btrfs_item_key(right, &disk_key, 0);
btrfs_fixup_low_keys(root, path, &disk_key, 1);
btrfs_fixup_low_keys(path, &disk_key, 1);
/* then fixup the leaf pointer in the path */
if (path->slots[0] < push_items) {
@ -2483,10 +2483,8 @@ again:
free_extent_buffer(path->nodes[0]);
path->nodes[0] = right;
path->slots[0] = 0;
if (path->slots[1] == 0) {
btrfs_fixup_low_keys(root, path,
&disk_key, 1);
}
if (path->slots[1] == 0)
btrfs_fixup_low_keys(path, &disk_key, 1);
}
btrfs_mark_buffer_dirty(right);
return ret;
@ -2700,7 +2698,7 @@ int btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
btrfs_set_disk_key_offset(&disk_key, offset + size_diff);
btrfs_set_item_key(leaf, &disk_key, slot);
if (slot == 0)
btrfs_fixup_low_keys(root, path, &disk_key, 1);
btrfs_fixup_low_keys(path, &disk_key, 1);
}
item = btrfs_item_nr(slot);
@ -2877,7 +2875,7 @@ int btrfs_insert_empty_items(struct btrfs_trans_handle *trans,
ret = 0;
if (slot == 0) {
btrfs_cpu_key_to_disk(&disk_key, cpu_key);
btrfs_fixup_low_keys(root, path, &disk_key, 1);
btrfs_fixup_low_keys(path, &disk_key, 1);
}
if (btrfs_leaf_free_space(leaf) < 0) {
@ -2950,7 +2948,7 @@ int btrfs_del_ptr(struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_disk_key disk_key;
btrfs_node_key(parent, &disk_key, 0);
btrfs_fixup_low_keys(root, path, &disk_key, level + 1);
btrfs_fixup_low_keys(path, &disk_key, level + 1);
}
btrfs_mark_buffer_dirty(parent);
return ret;
@ -3050,7 +3048,7 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
struct btrfs_disk_key disk_key;
btrfs_item_key(leaf, &disk_key, 0);
btrfs_fixup_low_keys(root, path, &disk_key, 1);
btrfs_fixup_low_keys(path, &disk_key, 1);
}
/* delete the leaf if it is mostly empty */

View File

@ -2754,8 +2754,8 @@ static inline int btrfs_next_item(struct btrfs_root *root,
int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path);
int btrfs_leaf_free_space(struct extent_buffer *leaf);
void btrfs_fixup_low_keys(struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_disk_key *key, int level);
void btrfs_fixup_low_keys(struct btrfs_path *path, struct btrfs_disk_key *key,
int level);
int btrfs_set_item_key_safe(struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_key *new_key);
void btrfs_set_item_key_unsafe(struct btrfs_root *root,