btrfs: Don't pass fs_info to commit_fs_roots
authorNikolay Borisov <nborisov@suse.com>
Wed, 7 Feb 2018 15:55:44 +0000 (17:55 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:32 +0000 (15:09 +0200)
We already pass the transaction handle which has a reference to the
fs_info. No functional changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/transaction.c

index e332026a7f8237aab281ff18df55fc2874cfcdc9..f831251237fecae86f9a41de53201c7822dbcc86 100644 (file)
@@ -1257,9 +1257,9 @@ void btrfs_add_dead_root(struct btrfs_root *root)
 /*
  * update all the cowonly tree roots on disk
  */
 /*
  * update all the cowonly tree roots on disk
  */
-static noinline int commit_fs_roots(struct btrfs_trans_handle *trans,
-                                   struct btrfs_fs_info *fs_info)
+static noinline int commit_fs_roots(struct btrfs_trans_handle *trans)
 {
 {
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        struct btrfs_root *gang[8];
        int i;
        int ret;
        struct btrfs_root *gang[8];
        int i;
        int ret;
@@ -1377,7 +1377,7 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans,
         */
        mutex_lock(&fs_info->tree_log_mutex);
 
         */
        mutex_lock(&fs_info->tree_log_mutex);
 
-       ret = commit_fs_roots(trans, fs_info);
+       ret = commit_fs_roots(trans);
        if (ret)
                goto out;
        ret = btrfs_qgroup_account_extents(trans, fs_info);
        if (ret)
                goto out;
        ret = btrfs_qgroup_account_extents(trans, fs_info);
@@ -2163,7 +2163,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
         */
        mutex_lock(&fs_info->tree_log_mutex);
 
         */
        mutex_lock(&fs_info->tree_log_mutex);
 
-       ret = commit_fs_roots(trans, fs_info);
+       ret = commit_fs_roots(trans);
        if (ret) {
                mutex_unlock(&fs_info->tree_log_mutex);
                mutex_unlock(&fs_info->reloc_mutex);
        if (ret) {
                mutex_unlock(&fs_info->tree_log_mutex);
                mutex_unlock(&fs_info->reloc_mutex);