Skip to content

Commit 9798ba2

Browse files
fdmananakdave
authored andcommitted
btrfs: remove root argument from drop_one_dir_item()
The root argument for drop_one_dir_item() always matches the root of the given directory inode, since each log tree is associated to one and only one subvolume/root, so remove the argument. Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 5d03dbe commit 9798ba2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/btrfs/tree-log.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -921,11 +921,11 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
921921
* item
922922
*/
923923
static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans,
924-
struct btrfs_root *root,
925924
struct btrfs_path *path,
926925
struct btrfs_inode *dir,
927926
struct btrfs_dir_item *di)
928927
{
928+
struct btrfs_root *root = dir->root;
929929
struct inode *inode;
930930
char *name;
931931
int name_len;
@@ -1220,7 +1220,7 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans,
12201220
if (IS_ERR(di)) {
12211221
return PTR_ERR(di);
12221222
} else if (di) {
1223-
ret = drop_one_dir_item(trans, root, path, dir, di);
1223+
ret = drop_one_dir_item(trans, path, dir, di);
12241224
if (ret)
12251225
return ret;
12261226
}
@@ -1232,7 +1232,7 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans,
12321232
if (IS_ERR(di)) {
12331233
return PTR_ERR(di);
12341234
} else if (di) {
1235-
ret = drop_one_dir_item(trans, root, path, dir, di);
1235+
ret = drop_one_dir_item(trans, path, dir, di);
12361236
if (ret)
12371237
return ret;
12381238
}
@@ -2049,7 +2049,7 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans,
20492049
if (!exists)
20502050
goto out;
20512051

2052-
ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), dst_di);
2052+
ret = drop_one_dir_item(trans, path, BTRFS_I(dir), dst_di);
20532053
if (ret)
20542054
goto out;
20552055

0 commit comments

Comments
 (0)