diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-02-07 17:55:46 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-03-26 15:09:32 +0200 |
commit | 97cb39bb912c8092c5570578f2eb1b2988ac1af8 (patch) | |
tree | d06a657a741de29f3602a1e48c789b91d65a2580 /fs/btrfs/transaction.c | |
parent | 9386d8bc58e2088f05d2d49a9b8af626ebbe687b (diff) | |
download | blackbird-obmc-linux-97cb39bb912c8092c5570578f2eb1b2988ac1af8.tar.gz blackbird-obmc-linux-97cb39bb912c8092c5570578f2eb1b2988ac1af8.zip |
btrfs: Remove root argument of cleanup_transaction
The only thing the passed root is used for is:
1. get a reference to the fs_info and to
2. call trace_btrfs_transaction_commit.
We can achieve 1) by simply referring to the fs_info from passed trans
object. As far as 2) is concerned cleanup_transaction is called from
only one place and the 'root' argument passed is the one from the trans
handle. No functional changes.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 6cba2b0c2b8a..ad7546745b5b 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1867,10 +1867,9 @@ int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans, } -static void cleanup_transaction(struct btrfs_trans_handle *trans, - struct btrfs_root *root, int err) +static void cleanup_transaction(struct btrfs_trans_handle *trans, int err) { - struct btrfs_fs_info *fs_info = root->fs_info; + struct btrfs_fs_info *fs_info = trans->fs_info; struct btrfs_transaction *cur_trans = trans->transaction; DEFINE_WAIT(wait); @@ -1910,7 +1909,7 @@ static void cleanup_transaction(struct btrfs_trans_handle *trans, btrfs_put_transaction(cur_trans); btrfs_put_transaction(cur_trans); - trace_btrfs_transaction_commit(root); + trace_btrfs_transaction_commit(trans->root); if (current->journal_info == trans) current->journal_info = NULL; @@ -2331,7 +2330,7 @@ cleanup_transaction: btrfs_warn(fs_info, "Skipping commit of aborted transaction."); if (current->journal_info == trans) current->journal_info = NULL; - cleanup_transaction(trans, trans->root, ret); + cleanup_transaction(trans, ret); return ret; } |