path: root/check
diff options
authorNikolay Borisov <>2018-06-08 15:47:49 +0300
committerDavid Sterba <>2018-08-06 15:01:57 +0200
commitf3c710111694db1678c9af5d0ad913c8d1706444 (patch)
tree9edb2faf17e704e1cf6e6b0af2640360af2c9126 /check
parent6a4ae9bd851e996e22c98ca69a33ff49d8872f9f (diff)
btrfs-progs: check: Drop trans/root arguments from free_extent_hook
They are not really needed, what free_extent_hook wants is really a pointer to fs_info so give it to it directly. This is in preparation of delayed refs code. Signed-off-by: Nikolay Borisov <> Reviewed-by: Qu Wenruo <> Signed-off-by: David Sterba <>
Diffstat (limited to 'check')
1 files changed, 2 insertions, 3 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);