summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-cache.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2016-06-21 10:40:19 -0400
committerDavid Sterba <dsterba@suse.com>2016-12-06 16:06:57 +0100
commit5b4aacefb8fbfc996e68b9b083d30f8bc0972449 (patch)
treecd4f1669a5bf9f8f2896c27f4b0d9d51e8a68e43 /fs/btrfs/free-space-cache.c
parent515bdc479097ec9d5f389202842345af3162f71c (diff)
downloadop-kernel-dev-5b4aacefb8fbfc996e68b9b083d30f8bc0972449.zip
op-kernel-dev-5b4aacefb8fbfc996e68b9b083d30f8bc0972449.tar.gz
btrfs: call functions that overwrite their root parameter with fs_info
There are 11 functions that accept a root parameter and immediately overwrite it. We can pass those an fs_info pointer instead. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r--fs/btrfs/free-space-cache.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index c698dcc..a538133 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -1350,17 +1350,16 @@ out_nospc:
goto out;
}
-int btrfs_write_out_cache(struct btrfs_root *root,
+int btrfs_write_out_cache(struct btrfs_fs_info *fs_info,
struct btrfs_trans_handle *trans,
struct btrfs_block_group_cache *block_group,
struct btrfs_path *path)
{
+ struct btrfs_root *root = fs_info->tree_root;
struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
struct inode *inode;
int ret = 0;
- root = root->fs_info->tree_root;
-
spin_lock(&block_group->lock);
if (block_group->disk_cache_state < BTRFS_DC_SETUP) {
spin_unlock(&block_group->lock);
OpenPOWER on IntegriCloud