summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-06-08 15:47:44 +0300
committerDavid Sterba <dsterba@suse.com>2018-08-06 15:01:44 +0200
commit819ac5393149a1c8b09a58f84214395071929b5c (patch)
tree807bccaf8496e4b93f5d0e3631b2dcc72ac9d191
parent0cbcc58b965dff15980d65d27853bd6a9348a627 (diff)
btrfs-progs: Remove root argument from pin_down_bytes
This argument is used to obtain a reference to fs_info, which can already be done from the passed trans handle, so use that instead. This is in preparation for delayed refs support. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--extent-tree.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/extent-tree.c b/extent-tree.c
index 0643815b..cbc022f6 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -2098,9 +2098,8 @@ static int finish_current_insert(struct btrfs_trans_handle *trans)
return 0;
}
-static int pin_down_bytes(struct btrfs_trans_handle *trans,
- struct btrfs_root *root,
- u64 bytenr, u64 num_bytes, int is_data)
+static int pin_down_bytes(struct btrfs_trans_handle *trans, u64 bytenr,
+ u64 num_bytes, int is_data)
{
int err = 0;
struct extent_buffer *buf;
@@ -2108,7 +2107,7 @@ static int pin_down_bytes(struct btrfs_trans_handle *trans,
if (is_data)
goto pinit;
- buf = btrfs_find_tree_block(root->fs_info, bytenr, num_bytes);
+ buf = btrfs_find_tree_block(trans->fs_info, bytenr, num_bytes);
if (!buf)
goto pinit;
@@ -2360,7 +2359,7 @@ static int __free_extent(struct btrfs_trans_handle *trans,
}
if (pin) {
- ret = pin_down_bytes(trans, root, bytenr, num_bytes,
+ ret = pin_down_bytes(trans, bytenr, num_bytes,
is_data);
if (ret > 0)
mark_free = 1;