summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-06-29 04:56:42 -0400
committerDavid Sterba <dsterba@suse.com>2018-08-06 07:12:43 -0400
commit3ffbd68c48320730ef64ebfb5e639220f1f65483 (patch)
tree8ba0da4fa561d426c61374ab3309e68ebcdc3993 /fs/btrfs/tree-log.c
parent37508515621551538addaf826ab4b8a9aaf0a382 (diff)
btrfs: simplify pointer chasing of local fs_info variables
Functions that get btrfs inode can simply reach the fs_info by dereferencing the root and this looks a bit more straightforward compared to the btrfs_sb(...) indirection. If the transaction handle is available and not NULL it's used instead. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 6bca8f88ade0..7b7498f1f641 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3739,7 +3739,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans,
3739 int start_slot, int nr, int inode_only, 3739 int start_slot, int nr, int inode_only,
3740 u64 logged_isize) 3740 u64 logged_isize)
3741{ 3741{
3742 struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb); 3742 struct btrfs_fs_info *fs_info = trans->fs_info;
3743 unsigned long src_offset; 3743 unsigned long src_offset;
3744 unsigned long dst_offset; 3744 unsigned long dst_offset;
3745 struct btrfs_root *log = inode->root->log_root; 3745 struct btrfs_root *log = inode->root->log_root;
@@ -5436,7 +5436,7 @@ static int btrfs_log_all_parents(struct btrfs_trans_handle *trans,
5436 struct btrfs_inode *inode, 5436 struct btrfs_inode *inode,
5437 struct btrfs_log_ctx *ctx) 5437 struct btrfs_log_ctx *ctx)
5438{ 5438{
5439 struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb); 5439 struct btrfs_fs_info *fs_info = trans->fs_info;
5440 int ret; 5440 int ret;
5441 struct btrfs_path *path; 5441 struct btrfs_path *path;
5442 struct btrfs_key key; 5442 struct btrfs_key key;
@@ -5971,7 +5971,7 @@ int btrfs_log_new_name(struct btrfs_trans_handle *trans,
5971 struct btrfs_inode *inode, struct btrfs_inode *old_dir, 5971 struct btrfs_inode *inode, struct btrfs_inode *old_dir,
5972 struct dentry *parent) 5972 struct dentry *parent)
5973{ 5973{
5974 struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb); 5974 struct btrfs_fs_info *fs_info = trans->fs_info;
5975 5975
5976 /* 5976 /*
5977 * this will force the logging code to walk the dentry chain 5977 * this will force the logging code to walk the dentry chain