btrfs: get fs_info from trans in btrfs_setup_space_cache
authorDavid Sterba <dsterba@suse.com>
Wed, 20 Mar 2019 11:02:55 +0000 (12:02 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:40 +0000 (19:02 +0200)
We can read fs_info from the transaction and can drop it from the
parameters.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/transaction.c

index 1a6c5ce0cdacd333e6e6cd53df459b6f4d424c03..66f282340c628f889280f8f910cdbad2bae20f8d 100644 (file)
@@ -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_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);
 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);
index ef901d1685797a20e361022d588f158157645eea..ecb590a1e6137d02b4a0194698ce7586c1d368e3 100644 (file)
@@ -3531,9 +3531,9 @@ out:
        return ret;
 }
 
        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;
        struct btrfs_block_group_cache *cache, *tmp;
        struct btrfs_transaction *cur_trans = trans->transaction;
        struct btrfs_path *path;
index e5404326fc55bdb7d67f9dcfa6172cf65f9a889d..f233aeb019ec6b8657f354acfb6ca91a33c65d02 100644 (file)
@@ -1104,7 +1104,7 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans)
        if (ret)
                return ret;
 
        if (ret)
                return ret;
 
-       ret = btrfs_setup_space_cache(trans, fs_info);
+       ret = btrfs_setup_space_cache(trans);
        if (ret)
                return ret;
 
        if (ret)
                return ret;