diff options
author | Nikolay Borisov <n.borisov.lkml@gmail.com> | 2017-01-17 17:31:45 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-14 09:50:56 -0500 |
commit | 207e7d92aa231b37873adf7aca8a66576c48831f (patch) | |
tree | 6140f75290790c41ef134ef097312ddc60320c7c | |
parent | 4ec5934e43cabd16d3d61dd095e182c32e7433d5 (diff) |
btrfs: Make drop_one_dir_item take btrfs_inode
Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/tree-log.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 691ef8e40e85..64c323eefc68 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -843,7 +843,7 @@ out: | |||
843 | static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans, | 843 | static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans, |
844 | struct btrfs_root *root, | 844 | struct btrfs_root *root, |
845 | struct btrfs_path *path, | 845 | struct btrfs_path *path, |
846 | struct inode *dir, | 846 | struct btrfs_inode *dir, |
847 | struct btrfs_dir_item *di) | 847 | struct btrfs_dir_item *di) |
848 | { | 848 | { |
849 | struct btrfs_fs_info *fs_info = root->fs_info; | 849 | 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 | if (ret) | 875 | if (ret) |
876 | goto out; | 876 | goto out; |
877 | 877 | ||
878 | ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), BTRFS_I(inode), | 878 | ret = btrfs_unlink_inode(trans, root, dir, BTRFS_I(inode), name, |
879 | name, name_len); | 879 | name_len); |
880 | if (ret) | 880 | if (ret) |
881 | goto out; | 881 | goto out; |
882 | else | 882 | else |
@@ -1152,7 +1152,7 @@ next: | |||
1152 | di = btrfs_lookup_dir_index_item(trans, root, path, btrfs_ino(BTRFS_I(dir)), | 1152 | di = btrfs_lookup_dir_index_item(trans, root, path, btrfs_ino(BTRFS_I(dir)), |
1153 | ref_index, name, namelen, 0); | 1153 | ref_index, name, namelen, 0); |
1154 | if (di && !IS_ERR(di)) { | 1154 | if (di && !IS_ERR(di)) { |
1155 | ret = drop_one_dir_item(trans, root, path, dir, di); | 1155 | ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), di); |
1156 | if (ret) | 1156 | if (ret) |
1157 | return ret; | 1157 | return ret; |
1158 | } | 1158 | } |
@@ -1162,7 +1162,7 @@ next: | |||
1162 | di = btrfs_lookup_dir_item(trans, root, path, btrfs_ino(BTRFS_I(dir)), | 1162 | di = btrfs_lookup_dir_item(trans, root, path, btrfs_ino(BTRFS_I(dir)), |
1163 | name, namelen, 0); | 1163 | name, namelen, 0); |
1164 | if (di && !IS_ERR(di)) { | 1164 | if (di && !IS_ERR(di)) { |
1165 | ret = drop_one_dir_item(trans, root, path, dir, di); | 1165 | ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), di); |
1166 | if (ret) | 1166 | if (ret) |
1167 | return ret; | 1167 | return ret; |
1168 | } | 1168 | } |
@@ -1770,7 +1770,7 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans, | |||
1770 | if (!exists) | 1770 | if (!exists) |
1771 | goto out; | 1771 | goto out; |
1772 | 1772 | ||
1773 | ret = drop_one_dir_item(trans, root, path, dir, dst_di); | 1773 | ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), dst_di); |
1774 | if (ret) | 1774 | if (ret) |
1775 | goto out; | 1775 | goto out; |
1776 | 1776 | ||