diff options
author | David Sterba <dsterba@suse.com> | 2017-08-30 19:38:02 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-09-08 16:15:05 +0200 |
commit | 7349edaf28bc3785057e9932c005137fffd9b2d4 (patch) | |
tree | 95a1a10ecfb7c3420f4488b45eca1192448927e5 | |
parent | 04f480bc01dcce0efb7a987e3646b27c7b875403 (diff) |
btrfs-progs: check: pass fs_info to check_chunks_and_extents
The root pointer is set to fs_root as was originally.
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | cmds-check.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmds-check.c b/cmds-check.c index cbf1dcec..2c65c5bc 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -9830,7 +9830,7 @@ static int deal_root_from_list(struct list_head *list, return ret; } -static int check_chunks_and_extents(struct btrfs_root *root) +static int check_chunks_and_extents(struct btrfs_fs_info *fs_info) { struct rb_root dev_cache; struct cache_tree chunk_cache; @@ -9855,9 +9855,11 @@ static int check_chunks_and_extents(struct btrfs_root *root) struct list_head dropping_trees; struct list_head normal_trees; struct btrfs_root *root1; + struct btrfs_root *root; u64 objectid; u8 level; + root = fs_info->fs_root; dev_cache = RB_ROOT; cache_tree_init(&chunk_cache); block_group_tree_init(&block_group_cache); @@ -13027,7 +13029,7 @@ int cmd_check(int argc, char **argv) if (check_mode == CHECK_MODE_LOWMEM) ret = check_chunks_and_extents_v2(root); else - ret = check_chunks_and_extents(root); + ret = check_chunks_and_extents(info); err |= !!ret; if (ret) error( |