diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-06-05 10:41:13 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-07-27 12:55:37 +0200 |
commit | d90944141b4a7704fac7f2b8fcc566511176e4b4 (patch) | |
tree | 0a356f047952e0cb3d099f79dd2df2cd3ef31d50 /fs/btrfs/transaction.h | |
parent | 056d9beca3e5052134f9834dd2a159f3f113981c (diff) | |
download | lwn-d90944141b4a7704fac7f2b8fcc566511176e4b4.tar.gz lwn-d90944141b4a7704fac7f2b8fcc566511176e4b4.zip |
btrfs: make btrfs_set_inode_last_trans take btrfs_inode
Instead of making multiple calls to BTRFS_I simply take btrfs_inode as
an input paramter.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/transaction.h')
-rw-r--r-- | fs/btrfs/transaction.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index bf102e64bfb2..6f65fff6cf50 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h @@ -156,13 +156,13 @@ struct btrfs_pending_snapshot { }; static inline void btrfs_set_inode_last_trans(struct btrfs_trans_handle *trans, - struct inode *inode) + struct btrfs_inode *inode) { - spin_lock(&BTRFS_I(inode)->lock); - BTRFS_I(inode)->last_trans = trans->transaction->transid; - BTRFS_I(inode)->last_sub_trans = BTRFS_I(inode)->root->log_transid; - BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->root->last_log_commit; - spin_unlock(&BTRFS_I(inode)->lock); + spin_lock(&inode->lock); + inode->last_trans = trans->transaction->transid; + inode->last_sub_trans = inode->root->log_transid; + inode->last_log_commit = inode->root->last_log_commit; + spin_unlock(&inode->lock); } /* |