summaryrefslogtreecommitdiff
path: root/extent-tree.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-05-28 09:36:49 +0300
committerDavid Sterba <dsterba@suse.com>2018-06-07 16:37:37 +0200
commit947c2d56a439c87f244ca9d036b40adb27f5fbdc (patch)
tree29030b0b8de199c8609ec69fb743bef98f2e8326 /extent-tree.c
parent2d99e810d97f7d818c9b5e2b76a9eeb7555b6138 (diff)
btrfs-progs: Remove root argument from write_one_cache_group
It's not needed since we can acquire a reference to the fs_info from the transaction handle already passed. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.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 24fb964..1694c47 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -1699,13 +1699,12 @@ int btrfs_dec_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root,
}
static int write_one_cache_group(struct btrfs_trans_handle *trans,
- struct btrfs_root *root,
struct btrfs_path *path,
struct btrfs_block_group_cache *cache)
{
int ret;
int pending_ret;
- struct btrfs_root *extent_root = root->fs_info->extent_root;
+ struct btrfs_root *extent_root = trans->fs_info->extent_root;
unsigned long bi;
struct extent_buffer *leaf;
@@ -1765,7 +1764,7 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
BLOCK_GROUP_DIRTY);
cache = (struct btrfs_block_group_cache *)(unsigned long)ptr;
- ret = write_one_cache_group(trans, root, path, cache);
+ ret = write_one_cache_group(trans, path, cache);
}
btrfs_free_path(path);
return 0;