summaryrefslogtreecommitdiff
path: root/extent-tree.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-08-16 11:13:05 +0300
committerDavid Sterba <dsterba@suse.com>2018-10-23 14:48:41 +0200
commitd8a5e756be6beb47d315165610f68f18ae21fe39 (patch)
tree4193ef6e2e8170df8ce3e396ab149d245c02638f /extent-tree.c
parentc6039704c580aeac32d26d858f402be537cbe819 (diff)
btrfs-progs: Make btrfs_write_dirty_block_groups take only trans argument
The root argument is used only to get a reference to the fs_info, this can be achieved with the transaction handle being passed so use that. This is in preparation for moving this function in the main transaction commit routine. No functional changes. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r--extent-tree.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/extent-tree.c b/extent-tree.c
index 2958fee..8b36a36 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -1727,8 +1727,7 @@ fail:
}
-int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
- struct btrfs_root *root)
+int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans)
{
struct extent_io_tree *block_group_cache;
struct btrfs_block_group_cache *cache;
@@ -1739,7 +1738,7 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
u64 end;
u64 ptr;
- block_group_cache = &root->fs_info->block_group_cache;
+ block_group_cache = &trans->fs_info->block_group_cache;
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;