diff options
author | Jeff Mahoney | 2016-06-22 03:16:51 +0200 |
---|---|---|
committer | David Sterba | 2016-12-06 16:06:57 +0100 |
commit | 6bccf3ab1e1f0913268bfcd1c09cadb1f4f2857d (patch) | |
tree | a7eae4bb4dec1cd2f7b21f5010549bfaa9aaa08c /fs/btrfs/inode.c | |
parent | btrfs: call functions that overwrite their root parameter with fs_info (diff) | |
download | kernel-qcow2-linux-6bccf3ab1e1f0913268bfcd1c09cadb1f4f2857d.tar.gz kernel-qcow2-linux-6bccf3ab1e1f0913268bfcd1c09cadb1f4f2857d.tar.xz kernel-qcow2-linux-6bccf3ab1e1f0913268bfcd1c09cadb1f4f2857d.zip |
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 <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |