diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-01-20 16:09:12 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-03-23 17:01:37 +0100 |
commit | 7bfc10070573591163dae7be9bb09552d4e6dee5 (patch) | |
tree | e74f1730ee190553c4ca73223494cb3073ca0fb0 /fs/btrfs/tree-log.c | |
parent | 10e958d523f82e976e5bdb13898da0e0b3af61e0 (diff) | |
download | lwn-7bfc10070573591163dae7be9bb09552d4e6dee5.tar.gz lwn-7bfc10070573591163dae7be9bb09552d4e6dee5.zip |
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>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index c27e121603ac..8471f3c5525e 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -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; |