Commit 207e7d92 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Make drop_one_dir_item take btrfs_inode

Signed-off-by: default avatarNikolay Borisov <n.borisov.lkml@gmail.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 4ec5934e
...@@ -843,7 +843,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans, ...@@ -843,7 +843,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans, static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct btrfs_root *root,
struct btrfs_path *path, struct btrfs_path *path,
struct inode *dir, struct btrfs_inode *dir,
struct btrfs_dir_item *di) struct btrfs_dir_item *di)
{ {
struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_fs_info *fs_info = root->fs_info;
...@@ -875,8 +875,8 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans, ...@@ -875,8 +875,8 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans,
if (ret) if (ret)
goto out; goto out;
ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), BTRFS_I(inode), ret = btrfs_unlink_inode(trans, root, dir, BTRFS_I(inode), name,
name, name_len); name_len);
if (ret) if (ret)
goto out; goto out;
else else
...@@ -1152,7 +1152,7 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans, ...@@ -1152,7 +1152,7 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans,
di = btrfs_lookup_dir_index_item(trans, root, path, btrfs_ino(BTRFS_I(dir)), di = btrfs_lookup_dir_index_item(trans, root, path, btrfs_ino(BTRFS_I(dir)),
ref_index, name, namelen, 0); ref_index, name, namelen, 0);
if (di && !IS_ERR(di)) { if (di && !IS_ERR(di)) {
ret = drop_one_dir_item(trans, root, path, dir, di); ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), di);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -1162,7 +1162,7 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans, ...@@ -1162,7 +1162,7 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans,
di = btrfs_lookup_dir_item(trans, root, path, btrfs_ino(BTRFS_I(dir)), di = btrfs_lookup_dir_item(trans, root, path, btrfs_ino(BTRFS_I(dir)),
name, namelen, 0); name, namelen, 0);
if (di && !IS_ERR(di)) { if (di && !IS_ERR(di)) {
ret = drop_one_dir_item(trans, root, path, dir, di); ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), di);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -1770,7 +1770,7 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans, ...@@ -1770,7 +1770,7 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans,
if (!exists) if (!exists)
goto out; goto out;
ret = drop_one_dir_item(trans, root, path, dir, dst_di); ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), dst_di);
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