Commit 0c555c97 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by David Sterba

btrfs: directly pass in fs_info to btrfs_merge_delayed_refs

Now that none of the functions called by btrfs_merge_delayed_refs() needs
a btrfs_trans_handle, directly pass in a btrfs_fs_info to
btrfs_merge_delayed_refs().
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent afe2d748
...@@ -497,11 +497,10 @@ static bool merge_ref(struct btrfs_delayed_ref_root *delayed_refs, ...@@ -497,11 +497,10 @@ static bool merge_ref(struct btrfs_delayed_ref_root *delayed_refs,
return done; return done;
} }
void btrfs_merge_delayed_refs(struct btrfs_trans_handle *trans, void btrfs_merge_delayed_refs(struct btrfs_fs_info *fs_info,
struct btrfs_delayed_ref_root *delayed_refs, struct btrfs_delayed_ref_root *delayed_refs,
struct btrfs_delayed_ref_head *head) struct btrfs_delayed_ref_head *head)
{ {
struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_delayed_ref_node *ref; struct btrfs_delayed_ref_node *ref;
struct rb_node *node; struct rb_node *node;
u64 seq = 0; u64 seq = 0;
......
...@@ -357,7 +357,7 @@ int btrfs_add_delayed_data_ref(struct btrfs_trans_handle *trans, ...@@ -357,7 +357,7 @@ int btrfs_add_delayed_data_ref(struct btrfs_trans_handle *trans,
int btrfs_add_delayed_extent_op(struct btrfs_trans_handle *trans, int btrfs_add_delayed_extent_op(struct btrfs_trans_handle *trans,
u64 bytenr, u64 num_bytes, u64 bytenr, u64 num_bytes,
struct btrfs_delayed_extent_op *extent_op); struct btrfs_delayed_extent_op *extent_op);
void btrfs_merge_delayed_refs(struct btrfs_trans_handle *trans, void btrfs_merge_delayed_refs(struct btrfs_fs_info *fs_info,
struct btrfs_delayed_ref_root *delayed_refs, struct btrfs_delayed_ref_root *delayed_refs,
struct btrfs_delayed_ref_head *head); struct btrfs_delayed_ref_head *head);
......
...@@ -1966,7 +1966,7 @@ static int btrfs_run_delayed_refs_for_head(struct btrfs_trans_handle *trans, ...@@ -1966,7 +1966,7 @@ static int btrfs_run_delayed_refs_for_head(struct btrfs_trans_handle *trans,
cond_resched(); cond_resched();
spin_lock(&locked_ref->lock); spin_lock(&locked_ref->lock);
btrfs_merge_delayed_refs(trans, delayed_refs, locked_ref); btrfs_merge_delayed_refs(fs_info, delayed_refs, locked_ref);
} }
return 0; return 0;
...@@ -2013,7 +2013,7 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, ...@@ -2013,7 +2013,7 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
* insert_inline_extent_backref()). * insert_inline_extent_backref()).
*/ */
spin_lock(&locked_ref->lock); spin_lock(&locked_ref->lock);
btrfs_merge_delayed_refs(trans, delayed_refs, locked_ref); btrfs_merge_delayed_refs(fs_info, delayed_refs, locked_ref);
ret = btrfs_run_delayed_refs_for_head(trans, locked_ref, ret = btrfs_run_delayed_refs_for_head(trans, locked_ref,
&actual_count); &actual_count);
......
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