Commit 6d9cc072 authored by Filipe Manana's avatar Filipe Manana Committed by David Sterba

btrfs: remove root argument from add_link()

The root argument for tree-log.c:add_link() always matches the root of the
given directory and the given inode, so it can eliminated.
Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 4467af88
...@@ -1413,10 +1413,11 @@ static int btrfs_inode_ref_exists(struct inode *inode, struct inode *dir, ...@@ -1413,10 +1413,11 @@ static int btrfs_inode_ref_exists(struct inode *inode, struct inode *dir,
return ret; return ret;
} }
static int add_link(struct btrfs_trans_handle *trans, struct btrfs_root *root, static int add_link(struct btrfs_trans_handle *trans,
struct inode *dir, struct inode *inode, const char *name, struct inode *dir, struct inode *inode, const char *name,
int namelen, u64 ref_index) int namelen, u64 ref_index)
{ {
struct btrfs_root *root = BTRFS_I(dir)->root;
struct btrfs_dir_item *dir_item; struct btrfs_dir_item *dir_item;
struct btrfs_key key; struct btrfs_key key;
struct btrfs_path *path; struct btrfs_path *path;
...@@ -1612,7 +1613,7 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans, ...@@ -1612,7 +1613,7 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans,
goto out; goto out;
/* insert our name */ /* insert our name */
ret = add_link(trans, root, dir, inode, name, namelen, ret = add_link(trans, dir, inode, name, namelen,
ref_index); ref_index);
if (ret) if (ret)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment