summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorJeff Mahoney2017-02-15 22:28:30 +0100
committerDavid Sterba2017-02-17 12:03:56 +0100
commit77ab86bf1c64ab282f2230521c7d4d7f69ea3a3f (patch)
tree69cb50c98914c2bf277fefc78ec51ce23889ec5f /fs/btrfs/relocation.c
parentbtrfs: convert btrfs_inc_block_group_ro to accept fs_info (diff)
downloadkernel-qcow2-linux-77ab86bf1c64ab282f2230521c7d4d7f69ea3a3f.tar.gz
kernel-qcow2-linux-77ab86bf1c64ab282f2230521c7d4d7f69ea3a3f.tar.xz
kernel-qcow2-linux-77ab86bf1c64ab282f2230521c7d4d7f69ea3a3f.zip
btrfs: free-space-cache, clean up unnecessary root arguments
The free space cache APIs accept a root but always use the tree root. Also, btrfs_truncate_free_space_cache accepts a root AND an inode but the inode always points to the root anyway, so let's just pass the inode. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index e2cf65cd8f17..ddbde0f08365 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -3543,7 +3543,7 @@ truncate:
goto out;
}
- ret = btrfs_truncate_free_space_cache(root, trans, block_group, inode);
+ ret = btrfs_truncate_free_space_cache(trans, block_group, inode);
btrfs_end_transaction(trans);
btrfs_btree_balance_dirty(fs_info);
@@ -4347,8 +4347,7 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start)
goto out;
}
- inode = lookup_free_space_inode(fs_info->tree_root, rc->block_group,
- path);
+ inode = lookup_free_space_inode(fs_info, rc->block_group, path);
btrfs_free_path(path);
if (!IS_ERR(inode))