btrfs: Don't pass fs_info to commit_cowonly_roots
authorNikolay Borisov <nborisov@suse.com>
Wed, 7 Feb 2018 15:55:45 +0000 (17:55 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:32 +0000 (15:09 +0200)
We already pass a transaction handle which refrences the fs_info so
we can grab it from there. No functional changes.

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

index f831251237fecae86f9a41de53201c7822dbcc86..6cba2b0c2b8a83a8308951232aedf91d835211e4 100644 (file)
@@ -1161,9 +1161,9 @@ static int update_cowonly_root(struct btrfs_trans_handle *trans,
  * failures will cause the file system to go offline. We still need
  * to clean up the delayed refs.
  */
-static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans,
-                                        struct btrfs_fs_info *fs_info)
+static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans)
 {
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        struct list_head *dirty_bgs = &trans->transaction->dirty_bgs;
        struct list_head *io_bgs = &trans->transaction->io_bgs;
        struct list_head *next;
@@ -1403,7 +1403,7 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans,
         * like chunk and root tree, as they won't affect qgroup.
         * And we don't write super to avoid half committed status.
         */
-       ret = commit_cowonly_roots(trans, fs_info);
+       ret = commit_cowonly_roots(trans);
        if (ret)
                goto out;
        switch_commit_roots(trans->transaction, fs_info);
@@ -2203,7 +2203,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
                goto scrub_continue;
        }
 
-       ret = commit_cowonly_roots(trans, fs_info);
+       ret = commit_cowonly_roots(trans);
        if (ret) {
                mutex_unlock(&fs_info->tree_log_mutex);
                mutex_unlock(&fs_info->reloc_mutex);