Commit e67bbbb9 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Make btrfs_delete_delayed_dir_index take btrfs_inode

Signed-off-by: default avatarNikolay Borisov <n.borisov.lkml@gmail.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 6f45d185
...@@ -1508,18 +1508,18 @@ static int btrfs_delete_delayed_insertion_item(struct btrfs_fs_info *fs_info, ...@@ -1508,18 +1508,18 @@ static int btrfs_delete_delayed_insertion_item(struct btrfs_fs_info *fs_info,
int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans, int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info, struct btrfs_fs_info *fs_info,
struct inode *dir, u64 index) struct btrfs_inode *dir, u64 index)
{ {
struct btrfs_delayed_node *node; struct btrfs_delayed_node *node;
struct btrfs_delayed_item *item; struct btrfs_delayed_item *item;
struct btrfs_key item_key; struct btrfs_key item_key;
int ret; int ret;
node = btrfs_get_or_create_delayed_node(BTRFS_I(dir)); node = btrfs_get_or_create_delayed_node(dir);
if (IS_ERR(node)) if (IS_ERR(node))
return PTR_ERR(node); return PTR_ERR(node);
item_key.objectid = btrfs_ino(BTRFS_I(dir)); item_key.objectid = btrfs_ino(dir);
item_key.type = BTRFS_DIR_INDEX_KEY; item_key.type = BTRFS_DIR_INDEX_KEY;
item_key.offset = index; item_key.offset = index;
......
...@@ -107,7 +107,7 @@ int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans, ...@@ -107,7 +107,7 @@ int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans,
int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans, int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info, struct btrfs_fs_info *fs_info,
struct inode *dir, u64 index); struct btrfs_inode *dir, u64 index);
int btrfs_inode_delayed_dir_index_count(struct inode *inode); int btrfs_inode_delayed_dir_index_count(struct inode *inode);
......
...@@ -4046,7 +4046,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans, ...@@ -4046,7 +4046,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans,
goto err; goto err;
} }
skip_backref: skip_backref:
ret = btrfs_delete_delayed_dir_index(trans, fs_info, dir, index); ret = btrfs_delete_delayed_dir_index(trans, fs_info, BTRFS_I(dir), index);
if (ret) { if (ret) {
btrfs_abort_transaction(trans, ret); btrfs_abort_transaction(trans, ret);
goto err; goto err;
...@@ -4210,7 +4210,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans, ...@@ -4210,7 +4210,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans,
} }
btrfs_release_path(path); btrfs_release_path(path);
ret = btrfs_delete_delayed_dir_index(trans, fs_info, dir, index); ret = btrfs_delete_delayed_dir_index(trans, fs_info, BTRFS_I(dir), index);
if (ret) { if (ret) {
btrfs_abort_transaction(trans, ret); btrfs_abort_transaction(trans, 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