summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-03-20 12:02:55 +0100
committerDavid Sterba <dsterba@suse.com>2019-04-29 19:02:40 +0200
commitbbebb3e0babb68bbff240608aaa14229d2d5d1dc (patch)
treeec4ec0f6f2e7c2b93daecef724484a4f356f646f /fs/btrfs
parent39db232daec79c8fec83b3447a8c9b7352c79fcc (diff)
downloadlinux-bbebb3e0babb68bbff240608aaa14229d2d5d1dc.tar.gz
linux-bbebb3e0babb68bbff240608aaa14229d2d5d1dc.tar.bz2
linux-bbebb3e0babb68bbff240608aaa14229d2d5d1dc.zip
btrfs: get fs_info from trans in btrfs_setup_space_cache
We can read fs_info from the transaction and can drop it from the parameters. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/ctree.h3
-rw-r--r--fs/btrfs/extent-tree.c4
-rw-r--r--fs/btrfs/transaction.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 1a6c5ce0cdac..66f282340c62 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2769,8 +2769,7 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
int btrfs_start_dirty_block_groups(struct btrfs_trans_handle *trans);
int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info);
-int btrfs_setup_space_cache(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info);
+int btrfs_setup_space_cache(struct btrfs_trans_handle *trans);
int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr);
int btrfs_free_block_groups(struct btrfs_fs_info *info);
int btrfs_read_block_groups(struct btrfs_fs_info *info);
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index ef901d168579..ecb590a1e613 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3531,9 +3531,9 @@ out:
return ret;
}
-int btrfs_setup_space_cache(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info)
+int btrfs_setup_space_cache(struct btrfs_trans_handle *trans)
{
+ struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_block_group_cache *cache, *tmp;
struct btrfs_transaction *cur_trans = trans->transaction;
struct btrfs_path *path;
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index e5404326fc55..f233aeb019ec 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1104,7 +1104,7 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans)
if (ret)
return ret;
- ret = btrfs_setup_space_cache(trans, fs_info);
+ ret = btrfs_setup_space_cache(trans);
if (ret)
return ret;