btrfs: Make btrfs_pin_reserved_extent take transaction handle
btrfs_pin_reserved_extent is now only called with a valid transaction so exploit the fact to take a transaction. This is preparation for tracking pinned extents on a per-transaction basis. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:

committed by
David Sterba

parent
10e958d523
commit
7bfc100705
@@ -2745,7 +2745,7 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
|
||||
btrfs_clean_tree_block(next);
|
||||
btrfs_wait_tree_block_writeback(next);
|
||||
btrfs_tree_unlock(next);
|
||||
ret = btrfs_pin_reserved_extent(fs_info,
|
||||
ret = btrfs_pin_reserved_extent(trans,
|
||||
bytenr, blocksize);
|
||||
if (ret) {
|
||||
free_extent_buffer(next);
|
||||
@@ -2814,7 +2814,7 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans,
|
||||
btrfs_clean_tree_block(next);
|
||||
btrfs_wait_tree_block_writeback(next);
|
||||
btrfs_tree_unlock(next);
|
||||
ret = btrfs_pin_reserved_extent(fs_info,
|
||||
ret = btrfs_pin_reserved_extent(trans,
|
||||
path->nodes[*level]->start,
|
||||
path->nodes[*level]->len);
|
||||
if (ret)
|
||||
@@ -2896,7 +2896,7 @@ static int walk_log_tree(struct btrfs_trans_handle *trans,
|
||||
btrfs_clean_tree_block(next);
|
||||
btrfs_wait_tree_block_writeback(next);
|
||||
btrfs_tree_unlock(next);
|
||||
ret = btrfs_pin_reserved_extent(fs_info,
|
||||
ret = btrfs_pin_reserved_extent(trans,
|
||||
next->start, next->len);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user