Commit 44e1c47d authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove fs_info from btrfs_add_delayed_tree_ref

This function is always called with a valid transaction handle from
where fs_info can be referenced. 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 fbe4801b
...@@ -709,13 +709,13 @@ static void init_delayed_ref_common(struct btrfs_fs_info *fs_info, ...@@ -709,13 +709,13 @@ static void init_delayed_ref_common(struct btrfs_fs_info *fs_info,
* to make sure the delayed ref is eventually processed before this * to make sure the delayed ref is eventually processed before this
* transaction commits. * transaction commits.
*/ */
int btrfs_add_delayed_tree_ref(struct btrfs_fs_info *fs_info, int btrfs_add_delayed_tree_ref(struct btrfs_trans_handle *trans,
struct btrfs_trans_handle *trans,
u64 bytenr, u64 num_bytes, u64 parent, u64 bytenr, u64 num_bytes, u64 parent,
u64 ref_root, int level, int action, u64 ref_root, int level, int action,
struct btrfs_delayed_extent_op *extent_op, struct btrfs_delayed_extent_op *extent_op,
int *old_ref_mod, int *new_ref_mod) int *old_ref_mod, int *new_ref_mod)
{ {
struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_delayed_tree_ref *ref; struct btrfs_delayed_tree_ref *ref;
struct btrfs_delayed_ref_head *head_ref; struct btrfs_delayed_ref_head *head_ref;
struct btrfs_delayed_ref_root *delayed_refs; struct btrfs_delayed_ref_root *delayed_refs;
......
...@@ -234,8 +234,7 @@ static inline void btrfs_put_delayed_ref_head(struct btrfs_delayed_ref_head *hea ...@@ -234,8 +234,7 @@ static inline void btrfs_put_delayed_ref_head(struct btrfs_delayed_ref_head *hea
kmem_cache_free(btrfs_delayed_ref_head_cachep, head); kmem_cache_free(btrfs_delayed_ref_head_cachep, head);
} }
int btrfs_add_delayed_tree_ref(struct btrfs_fs_info *fs_info, int btrfs_add_delayed_tree_ref(struct btrfs_trans_handle *trans,
struct btrfs_trans_handle *trans,
u64 bytenr, u64 num_bytes, u64 parent, u64 bytenr, u64 num_bytes, u64 parent,
u64 ref_root, int level, int action, u64 ref_root, int level, int action,
struct btrfs_delayed_extent_op *extent_op, struct btrfs_delayed_extent_op *extent_op,
......
...@@ -2176,7 +2176,7 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, ...@@ -2176,7 +2176,7 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
owner, offset, BTRFS_ADD_DELAYED_REF); owner, offset, BTRFS_ADD_DELAYED_REF);
if (owner < BTRFS_FIRST_FREE_OBJECTID) { if (owner < BTRFS_FIRST_FREE_OBJECTID) {
ret = btrfs_add_delayed_tree_ref(fs_info, trans, bytenr, ret = btrfs_add_delayed_tree_ref(trans, bytenr,
num_bytes, parent, num_bytes, parent,
root_objectid, (int)owner, root_objectid, (int)owner,
BTRFS_ADD_DELAYED_REF, NULL, BTRFS_ADD_DELAYED_REF, NULL,
...@@ -7196,7 +7196,7 @@ void btrfs_free_tree_block(struct btrfs_trans_handle *trans, ...@@ -7196,7 +7196,7 @@ void btrfs_free_tree_block(struct btrfs_trans_handle *trans,
root->root_key.objectid, root->root_key.objectid,
btrfs_header_level(buf), 0, btrfs_header_level(buf), 0,
BTRFS_DROP_DELAYED_REF); BTRFS_DROP_DELAYED_REF);
ret = btrfs_add_delayed_tree_ref(fs_info, trans, buf->start, ret = btrfs_add_delayed_tree_ref(trans, buf->start,
buf->len, parent, buf->len, parent,
root->root_key.objectid, root->root_key.objectid,
btrfs_header_level(buf), btrfs_header_level(buf),
...@@ -7275,7 +7275,7 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, ...@@ -7275,7 +7275,7 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans,
old_ref_mod = new_ref_mod = 0; old_ref_mod = new_ref_mod = 0;
ret = 0; ret = 0;
} else if (owner < BTRFS_FIRST_FREE_OBJECTID) { } else if (owner < BTRFS_FIRST_FREE_OBJECTID) {
ret = btrfs_add_delayed_tree_ref(fs_info, trans, bytenr, ret = btrfs_add_delayed_tree_ref(trans, bytenr,
num_bytes, parent, num_bytes, parent,
root_objectid, (int)owner, root_objectid, (int)owner,
BTRFS_DROP_DELAYED_REF, NULL, BTRFS_DROP_DELAYED_REF, NULL,
...@@ -8491,7 +8491,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, ...@@ -8491,7 +8491,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
btrfs_ref_tree_mod(root, ins.objectid, ins.offset, parent, btrfs_ref_tree_mod(root, ins.objectid, ins.offset, parent,
root_objectid, level, 0, root_objectid, level, 0,
BTRFS_ADD_DELAYED_EXTENT); BTRFS_ADD_DELAYED_EXTENT);
ret = btrfs_add_delayed_tree_ref(fs_info, trans, ins.objectid, ret = btrfs_add_delayed_tree_ref(trans, ins.objectid,
ins.offset, parent, ins.offset, parent,
root_objectid, level, root_objectid, level,
BTRFS_ADD_DELAYED_EXTENT, BTRFS_ADD_DELAYED_EXTENT,
......
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