Commit 70458a58 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove fs_info argument of btrfs_write_and_wait_transaction

We already pass btrfs_trans_handle which contains a reference to the
fs_info so use that. No functional changes.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent e9b919b1
...@@ -1091,12 +1091,12 @@ int btrfs_wait_tree_log_extents(struct btrfs_root *log_root, int mark) ...@@ -1091,12 +1091,12 @@ int btrfs_wait_tree_log_extents(struct btrfs_root *log_root, int mark)
* *
* @trans: transaction whose dirty pages we'd like to write * @trans: transaction whose dirty pages we'd like to write
*/ */
static int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans, static int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans)
struct btrfs_fs_info *fs_info)
{ {
int ret; int ret;
int ret2; int ret2;
struct extent_io_tree *dirty_pages = &trans->transaction->dirty_pages; struct extent_io_tree *dirty_pages = &trans->transaction->dirty_pages;
struct btrfs_fs_info *fs_info = trans->fs_info;
struct blk_plug plug; struct blk_plug plug;
blk_start_plug(&plug); blk_start_plug(&plug);
...@@ -1407,7 +1407,7 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans, ...@@ -1407,7 +1407,7 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans,
if (ret) if (ret)
goto out; goto out;
switch_commit_roots(trans->transaction); switch_commit_roots(trans->transaction);
ret = btrfs_write_and_wait_transaction(trans, fs_info); ret = btrfs_write_and_wait_transaction(trans);
if (ret) if (ret)
btrfs_handle_fs_error(fs_info, ret, btrfs_handle_fs_error(fs_info, ret,
"Error while writing out transaction for qgroup"); "Error while writing out transaction for qgroup");
...@@ -2261,7 +2261,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans) ...@@ -2261,7 +2261,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
wake_up(&fs_info->transaction_wait); wake_up(&fs_info->transaction_wait);
ret = btrfs_write_and_wait_transaction(trans, fs_info); ret = btrfs_write_and_wait_transaction(trans);
if (ret) { if (ret) {
btrfs_handle_fs_error(fs_info, ret, btrfs_handle_fs_error(fs_info, ret,
"Error while writing out transaction"); "Error while writing out transaction");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment