From: David Sterba Date: Wed, 30 Aug 2017 17:38:02 +0000 (+0200) Subject: btrfs-progs: check: pass fs_info to check_chunks_and_extents_v2 X-Git-Tag: upstream/4.16.1~468 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3e08c27e1e8a7470e95dabb3cd3ecdc24b148fe;p=platform%2Fupstream%2Fbtrfs-progs.git 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 --- 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;