summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--check/main.c5
-rw-r--r--ctree.h3
-rw-r--r--extent-tree.c4
3 files changed, 5 insertions, 7 deletions
diff --git a/check/main.c b/check/main.c
index 8db300ab..7c0e5a51 100644
--- a/check/main.c
+++ b/check/main.c
@@ -6275,8 +6275,7 @@ static int add_root_to_pending(struct extent_buffer *buf,
* we're tracking for repair. This hook makes sure we
* remove any backrefs for blocks as we are fixing them.
*/
-static int free_extent_hook(struct btrfs_trans_handle *trans,
- struct btrfs_root *root,
+static int free_extent_hook(struct btrfs_fs_info *fs_info,
u64 bytenr, u64 num_bytes, u64 parent,
u64 root_objectid, u64 owner, u64 offset,
int refs_to_drop)
@@ -6284,7 +6283,7 @@ static int free_extent_hook(struct btrfs_trans_handle *trans,
struct extent_record *rec;
struct cache_extent *cache;
int is_data;
- struct cache_tree *extent_cache = root->fs_info->fsck_extent_cache;
+ struct cache_tree *extent_cache = fs_info->fsck_extent_cache;
is_data = owner >= BTRFS_FIRST_FREE_OBJECTID;
cache = lookup_cache_extent(extent_cache, bytenr, num_bytes);
diff --git a/ctree.h b/ctree.h
index 7d4e9b63..4719962d 100644
--- a/ctree.h
+++ b/ctree.h
@@ -1143,8 +1143,7 @@ struct btrfs_fs_info {
int transaction_aborted;
- int (*free_extent_hook)(struct btrfs_trans_handle *trans,
- struct btrfs_root *root,
+ int (*free_extent_hook)(struct btrfs_fs_info *fs_info,
u64 bytenr, u64 num_bytes, u64 parent,
u64 root_objectid, u64 owner, u64 offset,
int refs_to_drop);
diff --git a/extent-tree.c b/extent-tree.c
index 6e7a1932..9132cb3f 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -2163,8 +2163,8 @@ static int __free_extent(struct btrfs_trans_handle *trans,
int skinny_metadata =
btrfs_fs_incompat(extent_root->fs_info, SKINNY_METADATA);
- if (root->fs_info->free_extent_hook) {
- root->fs_info->free_extent_hook(trans, root, bytenr, num_bytes,
+ if (trans->fs_info->free_extent_hook) {
+ trans->fs_info->free_extent_hook(trans->fs_info, bytenr, num_bytes,
parent, root_objectid, owner_objectid,
owner_offset, refs_to_drop);