From 6bccf3ab1e1f0913268bfcd1c09cadb1f4f2857d Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Tue, 21 Jun 2016 21:16:51 -0400 Subject: btrfs: call functions that always use the same root with fs_info instead There are many functions that are always called with the same root argument. Rather than passing the same root every time, we can pass an fs_info pointer instead and have the function get the root pointer itself. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba --- fs/btrfs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/btrfs/inode.c') diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c96d94ef846d..22ab45d21ff9 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4179,7 +4179,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans, } btrfs_release_path(path); - ret = btrfs_del_root_ref(trans, root->fs_info->tree_root, + ret = btrfs_del_root_ref(trans, root->fs_info, objectid, root->root_key.objectid, dir_ino, &index, name, name_len); if (ret < 0) { @@ -6296,7 +6296,7 @@ int btrfs_add_link(struct btrfs_trans_handle *trans, } if (unlikely(ino == BTRFS_FIRST_FREE_OBJECTID)) { - ret = btrfs_add_root_ref(trans, root->fs_info->tree_root, + ret = btrfs_add_root_ref(trans, root->fs_info, key.objectid, root->root_key.objectid, parent_ino, index, name, name_len); } else if (add_backref) { @@ -6332,7 +6332,7 @@ fail_dir_item: if (unlikely(ino == BTRFS_FIRST_FREE_OBJECTID)) { u64 local_index; int err; - err = btrfs_del_root_ref(trans, root->fs_info->tree_root, + err = btrfs_del_root_ref(trans, root->fs_info, key.objectid, root->root_key.objectid, parent_ino, &local_index, name, name_len); -- cgit v1.2.3-59-g8ed1b