[2/2] btrfs-progs: check: call btrfs_lookup_block_group() instead in check_extent_type()
diff mbox series

Message ID 20191111084226.475957-2-Damenly_Su@gmx.com
State New
Headers show
  • [1/2] btrfs-progs: add comments of block group lookup functions
Related show

Commit Message

Damenly Su Nov. 11, 2019, 8:42 a.m. UTC
From: Su Yue <Damenly_Su@gmx.com>

check_extent_type() wants to lookup the block group which contains the
extent, not the other contains or after the extent start.

Use btrfs_lookup_block_group() instead of

Signed-off-by: Su Yue <Damenly_Su@gmx.com>
 check/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series

diff --git a/check/main.c b/check/main.c
index a0e5ac47c152..d18d8e9fa80b 100644
--- a/check/main.c
+++ b/check/main.c
@@ -4530,7 +4530,7 @@  static void check_extent_type(struct extent_record *rec)
 	struct btrfs_block_group_cache *bg_cache;
-	bg_cache = btrfs_lookup_first_block_group(global_info, rec->start);
+	bg_cache = btrfs_lookup_block_group(global_info, rec->start);
 	if (!bg_cache)