Commit 9add2945 authored by Lu Fengqi's avatar Lu Fengqi Committed by David Sterba

btrfs: Remove fs_info from btrfs_delete_delayed_dir_index

It can be referenced from the passed transaction handle.
Signed-off-by: default avatarLu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 4465c8b4
...@@ -1493,7 +1493,6 @@ static int btrfs_delete_delayed_insertion_item(struct btrfs_fs_info *fs_info, ...@@ -1493,7 +1493,6 @@ 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_inode *dir, u64 index) struct btrfs_inode *dir, u64 index)
{ {
struct btrfs_delayed_node *node; struct btrfs_delayed_node *node;
...@@ -1509,7 +1508,8 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans, ...@@ -1509,7 +1508,8 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans,
item_key.type = BTRFS_DIR_INDEX_KEY; item_key.type = BTRFS_DIR_INDEX_KEY;
item_key.offset = index; item_key.offset = index;
ret = btrfs_delete_delayed_insertion_item(fs_info, node, &item_key); ret = btrfs_delete_delayed_insertion_item(trans->fs_info, node,
&item_key);
if (!ret) if (!ret)
goto end; goto end;
...@@ -1531,7 +1531,7 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans, ...@@ -1531,7 +1531,7 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans,
mutex_lock(&node->mutex); mutex_lock(&node->mutex);
ret = __btrfs_add_delayed_deletion_item(node, item); ret = __btrfs_add_delayed_deletion_item(node, item);
if (unlikely(ret)) { if (unlikely(ret)) {
btrfs_err(fs_info, btrfs_err(trans->fs_info,
"err add delayed dir index item(index: %llu) into the deletion tree of the delayed node(root id: %llu, inode id: %llu, errno: %d)", "err add delayed dir index item(index: %llu) into the deletion tree of the delayed node(root id: %llu, inode id: %llu, errno: %d)",
index, node->root->objectid, node->inode_id, ret); index, node->root->objectid, node->inode_id, ret);
BUG(); BUG();
......
...@@ -92,7 +92,6 @@ int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans, ...@@ -92,7 +92,6 @@ int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans,
u64 index); u64 index);
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_inode *dir, u64 index); struct btrfs_inode *dir, u64 index);
int btrfs_inode_delayed_dir_index_count(struct btrfs_inode *inode); int btrfs_inode_delayed_dir_index_count(struct btrfs_inode *inode);
......
...@@ -3978,7 +3978,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans, ...@@ -3978,7 +3978,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, dir, index);
if (ret) { if (ret) {
btrfs_abort_transaction(trans, ret); btrfs_abort_transaction(trans, ret);
goto err; goto err;
...@@ -4144,7 +4144,7 @@ static int btrfs_unlink_subvol(struct btrfs_trans_handle *trans, ...@@ -4144,7 +4144,7 @@ static 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, BTRFS_I(dir), index); ret = btrfs_delete_delayed_dir_index(trans, 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