Commit f033798d authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Drop fs_info parameter from add_delayed_data_ref

It's provided by the transaction handle.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 1acda0c2
...@@ -704,8 +704,7 @@ add_delayed_tree_ref(struct btrfs_fs_info *fs_info, ...@@ -704,8 +704,7 @@ add_delayed_tree_ref(struct btrfs_fs_info *fs_info,
* helper to insert a delayed data ref into the rbtree. * helper to insert a delayed data ref into the rbtree.
*/ */
static noinline void static noinline void
add_delayed_data_ref(struct btrfs_fs_info *fs_info, add_delayed_data_ref(struct btrfs_trans_handle *trans,
struct btrfs_trans_handle *trans,
struct btrfs_delayed_ref_head *head_ref, struct btrfs_delayed_ref_head *head_ref,
struct btrfs_delayed_ref_node *ref, u64 bytenr, struct btrfs_delayed_ref_node *ref, u64 bytenr,
u64 num_bytes, u64 parent, u64 ref_root, u64 owner, u64 num_bytes, u64 parent, u64 ref_root, u64 owner,
...@@ -722,7 +721,7 @@ add_delayed_data_ref(struct btrfs_fs_info *fs_info, ...@@ -722,7 +721,7 @@ add_delayed_data_ref(struct btrfs_fs_info *fs_info,
delayed_refs = &trans->transaction->delayed_refs; delayed_refs = &trans->transaction->delayed_refs;
if (is_fstree(ref_root)) if (is_fstree(ref_root))
seq = atomic64_read(&fs_info->tree_mod_seq); seq = atomic64_read(&trans->fs_info->tree_mod_seq);
/* first set the basic ref node struct up */ /* first set the basic ref node struct up */
refcount_set(&ref->refs, 1); refcount_set(&ref->refs, 1);
...@@ -747,7 +746,7 @@ add_delayed_data_ref(struct btrfs_fs_info *fs_info, ...@@ -747,7 +746,7 @@ add_delayed_data_ref(struct btrfs_fs_info *fs_info,
full_ref->objectid = owner; full_ref->objectid = owner;
full_ref->offset = offset; full_ref->offset = offset;
trace_add_delayed_data_ref(fs_info, ref, full_ref, action); trace_add_delayed_data_ref(trans->fs_info, ref, full_ref, action);
ret = insert_delayed_ref(trans, delayed_refs, head_ref, ref); ret = insert_delayed_ref(trans, delayed_refs, head_ref, ref);
if (ret > 0) if (ret > 0)
...@@ -871,9 +870,8 @@ int btrfs_add_delayed_data_ref(struct btrfs_fs_info *fs_info, ...@@ -871,9 +870,8 @@ int btrfs_add_delayed_data_ref(struct btrfs_fs_info *fs_info,
action, 1, 0, &qrecord_inserted, action, 1, 0, &qrecord_inserted,
old_ref_mod, new_ref_mod); old_ref_mod, new_ref_mod);
add_delayed_data_ref(fs_info, trans, head_ref, &ref->node, bytenr, add_delayed_data_ref(trans, head_ref, &ref->node, bytenr, num_bytes,
num_bytes, parent, ref_root, owner, offset, parent, ref_root, owner, offset, action);
action);
spin_unlock(&delayed_refs->lock); spin_unlock(&delayed_refs->lock);
if (qrecord_inserted) if (qrecord_inserted)
......
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