mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-10 11:11:16 +00:00
btrfs-progs: Remove unused argument from clean_tree_block
This function actually uses only the extent_buffer arg but takes 3 arguments. Furthermore, it's current interface doesn't even mirror the kernel counterpart. Just remove the extra arguments. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
ebbcc81878
commit
a93d51ede7
12
ctree.c
12
ctree.c
@ -251,7 +251,7 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,
|
||||
ret = btrfs_dec_ref(trans, root, buf, 1);
|
||||
BUG_ON(ret);
|
||||
}
|
||||
clean_tree_block(trans, root, buf);
|
||||
clean_tree_block(buf);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -717,7 +717,7 @@ static int balance_level(struct btrfs_trans_handle *trans,
|
||||
root->node = child;
|
||||
add_root_to_dirty_list(root);
|
||||
path->nodes[level] = NULL;
|
||||
clean_tree_block(trans, root, mid);
|
||||
clean_tree_block(mid);
|
||||
/* once for the path */
|
||||
free_extent_buffer(mid);
|
||||
|
||||
@ -770,7 +770,7 @@ static int balance_level(struct btrfs_trans_handle *trans,
|
||||
u64 bytenr = right->start;
|
||||
u32 blocksize = right->len;
|
||||
|
||||
clean_tree_block(trans, root, right);
|
||||
clean_tree_block(right);
|
||||
free_extent_buffer(right);
|
||||
right = NULL;
|
||||
wret = btrfs_del_ptr(root, path, level + 1, pslot + 1);
|
||||
@ -816,7 +816,7 @@ static int balance_level(struct btrfs_trans_handle *trans,
|
||||
/* we've managed to empty the middle node, drop it */
|
||||
u64 bytenr = mid->start;
|
||||
u32 blocksize = mid->len;
|
||||
clean_tree_block(trans, root, mid);
|
||||
clean_tree_block(mid);
|
||||
free_extent_buffer(mid);
|
||||
mid = NULL;
|
||||
wret = btrfs_del_ptr(root, path, level + 1, pslot);
|
||||
@ -2739,7 +2739,7 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
|
||||
if (leaf == root->node) {
|
||||
btrfs_set_header_level(leaf, 0);
|
||||
} else {
|
||||
clean_tree_block(trans, root, leaf);
|
||||
clean_tree_block(leaf);
|
||||
wret = btrfs_del_leaf(trans, root, path, leaf);
|
||||
BUG_ON(ret);
|
||||
if (wret)
|
||||
@ -2775,7 +2775,7 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
|
||||
}
|
||||
|
||||
if (btrfs_header_nritems(leaf) == 0) {
|
||||
clean_tree_block(trans, root, leaf);
|
||||
clean_tree_block(leaf);
|
||||
path->slots[1] = slot;
|
||||
ret = btrfs_del_leaf(trans, root, path, leaf);
|
||||
BUG_ON(ret);
|
||||
|
@ -1684,8 +1684,7 @@ skip_commit:
|
||||
return err;
|
||||
}
|
||||
|
||||
int clean_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root,
|
||||
struct extent_buffer *eb)
|
||||
int clean_tree_block(struct extent_buffer *eb)
|
||||
{
|
||||
return clear_extent_buffer_dirty(eb);
|
||||
}
|
||||
|
@ -131,8 +131,7 @@ struct extent_buffer* btrfs_find_create_tree_block(
|
||||
|
||||
void btrfs_setup_root(struct btrfs_root *root, struct btrfs_fs_info *fs_info,
|
||||
u64 objectid);
|
||||
int clean_tree_block(struct btrfs_trans_handle *trans,
|
||||
struct btrfs_root *root, struct extent_buffer *buf);
|
||||
int clean_tree_block(struct extent_buffer *buf);
|
||||
|
||||
void btrfs_free_fs_info(struct btrfs_fs_info *fs_info);
|
||||
struct btrfs_fs_info *btrfs_new_fs_info(int writable, u64 sb_bytenr);
|
||||
|
@ -2129,7 +2129,7 @@ static int pin_down_bytes(struct btrfs_trans_handle *trans,
|
||||
if (header_owner != BTRFS_TREE_LOG_OBJECTID &&
|
||||
header_transid == trans->transid &&
|
||||
!btrfs_header_flag(buf, BTRFS_HEADER_FLAG_WRITTEN)) {
|
||||
clean_tree_block(NULL, root, buf);
|
||||
clean_tree_block(buf);
|
||||
free_extent_buffer(buf);
|
||||
return 1;
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ int btrfs_clear_free_space_tree(struct btrfs_fs_info *fs_info)
|
||||
|
||||
list_del(&free_space_root->dirty_list);
|
||||
|
||||
ret = clean_tree_block(trans, tree_root, free_space_root->node);
|
||||
ret = clean_tree_block(free_space_root->node);
|
||||
if (ret)
|
||||
goto abort;
|
||||
ret = btrfs_free_tree_block(trans, free_space_root,
|
||||
|
Loading…
Reference in New Issue
Block a user