We already pass btrfs_trans_handle which contains a reference to the
fs_info so use that. No functional changes

Signed-off-by: Nikolay Borisov <nbori...@suse.com>
---
 fs/btrfs/transaction.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index b8dbe4e88631..a57065f022ff 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1091,10 +1091,10 @@ int btrfs_wait_tree_log_extents(struct btrfs_root 
*log_root, int mark)
  *
  * @trans: transaction whose dirty pages we'd like to write
  */
-static int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans,
-                                           struct btrfs_fs_info *fs_info)
+static int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans)
 {
        struct extent_io_tree *dirty_pages = &trans->transaction->dirty_pages;
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        struct blk_plug plug;
        int ret, ret2;
 
@@ -1406,7 +1406,7 @@ static int qgroup_account_snapshot(struct 
btrfs_trans_handle *trans,
        if (ret)
                goto out;
        switch_commit_roots(trans->transaction);
-       ret = btrfs_write_and_wait_transaction(trans, fs_info);
+       ret = btrfs_write_and_wait_transaction(trans);
        if (ret)
                btrfs_handle_fs_error(fs_info, ret,
                        "Error while writing out transaction for qgroup");
@@ -2260,7 +2260,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle 
*trans)
 
        wake_up(&fs_info->transaction_wait);
 
-       ret = btrfs_write_and_wait_transaction(trans, fs_info);
+       ret = btrfs_write_and_wait_transaction(trans);
        if (ret) {
                btrfs_handle_fs_error(fs_info, ret,
                                      "Error while writing out transaction");
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to