Commit 2590d0f1 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove fs_info argument from __btrfs_inc_extent_ref

This function already takes a transaction which holds a reference to
the fs_info struct. Use that reference and remove the extra arg. No
functional changes.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ef89b824
...@@ -2231,12 +2231,12 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, ...@@ -2231,12 +2231,12 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
* *
*/ */
static int __btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, static int __btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_delayed_ref_node *node, struct btrfs_delayed_ref_node *node,
u64 parent, u64 root_objectid, u64 parent, u64 root_objectid,
u64 owner, u64 offset, int refs_to_add, u64 owner, u64 offset, int refs_to_add,
struct btrfs_delayed_extent_op *extent_op) struct btrfs_delayed_extent_op *extent_op)
{ {
struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_path *path; struct btrfs_path *path;
struct extent_buffer *leaf; struct extent_buffer *leaf;
struct btrfs_extent_item *item; struct btrfs_extent_item *item;
...@@ -2320,10 +2320,9 @@ static int run_delayed_data_ref(struct btrfs_trans_handle *trans, ...@@ -2320,10 +2320,9 @@ static int run_delayed_data_ref(struct btrfs_trans_handle *trans,
ref->offset, &ins, ref->offset, &ins,
node->ref_mod); node->ref_mod);
} else if (node->action == BTRFS_ADD_DELAYED_REF) { } else if (node->action == BTRFS_ADD_DELAYED_REF) {
ret = __btrfs_inc_extent_ref(trans, fs_info, node, parent, ret = __btrfs_inc_extent_ref(trans, node, parent, ref_root,
ref_root, ref->objectid, ref->objectid, ref->offset,
ref->offset, node->ref_mod, node->ref_mod, extent_op);
extent_op);
} else if (node->action == BTRFS_DROP_DELAYED_REF) { } else if (node->action == BTRFS_DROP_DELAYED_REF) {
ret = __btrfs_free_extent(trans, node, parent, ret = __btrfs_free_extent(trans, node, parent,
ref_root, ref->objectid, ref_root, ref->objectid,
...@@ -2473,10 +2472,8 @@ static int run_delayed_tree_ref(struct btrfs_trans_handle *trans, ...@@ -2473,10 +2472,8 @@ static int run_delayed_tree_ref(struct btrfs_trans_handle *trans,
BUG_ON(!extent_op || !extent_op->update_flags); BUG_ON(!extent_op || !extent_op->update_flags);
ret = alloc_reserved_tree_block(trans, node, extent_op); ret = alloc_reserved_tree_block(trans, node, extent_op);
} else if (node->action == BTRFS_ADD_DELAYED_REF) { } else if (node->action == BTRFS_ADD_DELAYED_REF) {
ret = __btrfs_inc_extent_ref(trans, fs_info, node, ret = __btrfs_inc_extent_ref(trans, node, parent, ref_root,
parent, ref_root, ref->level, 0, 1, extent_op);
ref->level, 0, 1,
extent_op);
} else if (node->action == BTRFS_DROP_DELAYED_REF) { } else if (node->action == BTRFS_DROP_DELAYED_REF) {
ret = __btrfs_free_extent(trans, node, parent, ref_root, ret = __btrfs_free_extent(trans, node, parent, ref_root,
ref->level, 0, 1, extent_op); ref->level, 0, 1, extent_op);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment