diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-10 18:19:25 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-26 13:54:26 +0200 |
commit | 66642832f06a4351e23cea6cf254967c227f8224 (patch) | |
tree | 8ae0bc5a61945bdec42d6c7a929967c548031d5d /fs/btrfs/super.c | |
parent | 64b63580728ef19137d35363a1c28794b70ad416 (diff) | |
download | blackbird-op-linux-66642832f06a4351e23cea6cf254967c227f8224.tar.gz blackbird-op-linux-66642832f06a4351e23cea6cf254967c227f8224.zip |
btrfs: btrfs_abort_transaction, drop root parameter
__btrfs_abort_transaction doesn't use its root parameter except to
obtain an fs_info pointer. We can obtain that from trans->root->fs_info
for now and from trans->fs_info in a later patch.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 959823a12c42..864ce334f696 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -251,9 +251,11 @@ void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) */ __cold void __btrfs_abort_transaction(struct btrfs_trans_handle *trans, - struct btrfs_root *root, const char *function, + const char *function, unsigned int line, int errno) { + struct btrfs_fs_info *fs_info = trans->fs_info; + trans->aborted = errno; /* Nothing used. The other threads that have joined this * transaction may be able to continue. */ @@ -261,16 +263,16 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans, const char *errstr; errstr = btrfs_decode_error(errno); - btrfs_warn(root->fs_info, + btrfs_warn(fs_info, "%s:%d: Aborting unused transaction(%s).", function, line, errstr); return; } ACCESS_ONCE(trans->transaction->aborted) = errno; /* Wake up anybody who may be waiting on this transaction */ - wake_up(&root->fs_info->transaction_wait); - wake_up(&root->fs_info->transaction_blocked_wait); - __btrfs_handle_fs_error(root->fs_info, function, line, errno, NULL); + wake_up(&fs_info->transaction_wait); + wake_up(&fs_info->transaction_blocked_wait); + __btrfs_handle_fs_error(fs_info, function, line, errno, NULL); } /* * __btrfs_panic decodes unexpected, fatal errors from the caller, |