From b3e08c27e1e8a7470e95dabb3cd3ecdc24b148fe Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 30 Aug 2017 19:38:02 +0200 Subject: [PATCH] btrfs-progs: check: pass fs_info to check_chunks_and_extents_v2 The root pointer is set to fs_root as was originally. Signed-off-by: David Sterba --- cmds-check.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmds-check.c b/cmds-check.c index d0779e6..7dd6a0b 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -11503,15 +11503,18 @@ static int traverse_tree_block(struct btrfs_root *root, /* * Low memory usage version check_chunks_and_extents. */ -static int check_chunks_and_extents_v2(struct btrfs_root *root) +static int check_chunks_and_extents_v2(struct btrfs_fs_info *fs_info) { struct btrfs_path path; struct btrfs_key key; struct btrfs_root *root1; + struct btrfs_root *root; struct btrfs_root *cur_root; int err = 0; int ret; + root = fs_info->fs_root; + root1 = root->fs_info->chunk_root; ret = traverse_tree_block(root1, root1->node); err |= ret; @@ -13026,7 +13029,7 @@ int cmd_check(int argc, char **argv) if (!ctx.progress_enabled) fprintf(stderr, "checking extents\n"); if (check_mode == CHECK_MODE_LOWMEM) - ret = check_chunks_and_extents_v2(root); + ret = check_chunks_and_extents_v2(info); else ret = check_chunks_and_extents(info); err |= !!ret; -- 2.7.4