diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-02-07 16:55:39 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-03-26 15:09:31 +0200 |
commit | dc60c525cff11a5e60073cd1f618023b28b64ff1 (patch) | |
tree | 4324534f4d0a7f89044b8a8738cb73b1b01077f6 /fs/btrfs | |
parent | btrfs: Open code btrfs_write_and_wait_marked_extents (diff) | |
download | linux-dc60c525cff11a5e60073cd1f618023b28b64ff1.tar.xz linux-dc60c525cff11a5e60073cd1f618023b28b64ff1.zip |
btrfs: Remove fs_info argument from btrfs_trans_release_metadata
All current callers of this function just get a reference to the
trans->fs_info member and pass it as the second argument. Collapse this
into the function itself. No functional changes.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/transaction.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 03fbb8854a1b..bfbc1ace2a24 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -818,9 +818,11 @@ int btrfs_should_end_transaction(struct btrfs_trans_handle *trans) return should_end_transaction(trans); } -static void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info) +static void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans) + { + struct btrfs_fs_info *fs_info = trans->fs_info; + if (!trans->block_rsv) { ASSERT(!trans->bytes_reserved); return; @@ -854,7 +856,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, return 0; } - btrfs_trans_release_metadata(trans, info); + btrfs_trans_release_metadata(trans); trans->block_rsv = NULL; if (!list_empty(&trans->new_bgs)) @@ -875,7 +877,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, must_run_delayed_refs = 2; } - btrfs_trans_release_metadata(trans, info); + btrfs_trans_release_metadata(trans); trans->block_rsv = NULL; if (!list_empty(&trans->new_bgs)) @@ -1969,7 +1971,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans) return ret; } - btrfs_trans_release_metadata(trans, fs_info); + btrfs_trans_release_metadata(trans); trans->block_rsv = NULL; cur_trans = trans->transaction; @@ -2323,7 +2325,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans) scrub_continue: btrfs_scrub_continue(fs_info); cleanup_transaction: - btrfs_trans_release_metadata(trans, fs_info); + btrfs_trans_release_metadata(trans); btrfs_trans_release_chunk_metadata(trans); trans->block_rsv = NULL; btrfs_warn(fs_info, "Skipping commit of aborted transaction."); |