Commit 87cc7a8a authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove fs_info from remove_extent_backref

It can be referenced directly from the transaction handle since it's
always valid.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 5fac7f9e
...@@ -1998,7 +1998,6 @@ static int insert_extent_backref(struct btrfs_trans_handle *trans, ...@@ -1998,7 +1998,6 @@ static int insert_extent_backref(struct btrfs_trans_handle *trans,
} }
static int remove_extent_backref(struct btrfs_trans_handle *trans, static int remove_extent_backref(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_path *path, struct btrfs_path *path,
struct btrfs_extent_inline_ref *iref, struct btrfs_extent_inline_ref *iref,
int refs_to_drop, int is_data, int *last_ref) int refs_to_drop, int is_data, int *last_ref)
...@@ -2014,7 +2013,7 @@ static int remove_extent_backref(struct btrfs_trans_handle *trans, ...@@ -2014,7 +2013,7 @@ static int remove_extent_backref(struct btrfs_trans_handle *trans,
last_ref); last_ref);
} else { } else {
*last_ref = 1; *last_ref = 1;
ret = btrfs_del_item(trans, fs_info->extent_root, path); ret = btrfs_del_item(trans, trans->fs_info->extent_root, path);
} }
return ret; return ret;
} }
...@@ -6896,7 +6895,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans, ...@@ -6896,7 +6895,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
#endif #endif
if (!found_extent) { if (!found_extent) {
BUG_ON(iref); BUG_ON(iref);
ret = remove_extent_backref(trans, info, path, NULL, ret = remove_extent_backref(trans, path, NULL,
refs_to_drop, refs_to_drop,
is_data, &last_ref); is_data, &last_ref);
if (ret) { if (ret) {
...@@ -7040,9 +7039,9 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans, ...@@ -7040,9 +7039,9 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
btrfs_mark_buffer_dirty(leaf); btrfs_mark_buffer_dirty(leaf);
} }
if (found_extent) { if (found_extent) {
ret = remove_extent_backref(trans, info, path, ret = remove_extent_backref(trans, path, iref,
iref, refs_to_drop, refs_to_drop, is_data,
is_data, &last_ref); &last_ref);
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