summaryrefslogtreecommitdiff
path: root/cmds-check.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2017-06-13 17:19:28 +0800
committerDavid Sterba <dsterba@suse.com>2017-07-12 17:53:33 +0200
commit505639ee62adf3ec31ba2c7b276d49ecc44c000c (patch)
tree1fc030b059b286bf63043655ab5342fd18fdeac1 /cmds-check.c
parenta0d9de4e40cc9e0c613826bebb9a9e4a512eb495 (diff)
btrfs-progs: Refactor btrfs_check_chunk_valid to use btrfs_fs_info
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-check.c')
-rw-r--r--cmds-check.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds-check.c b/cmds-check.c
index 339297d3..c5faa2b3 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -6626,7 +6626,7 @@ static int process_chunk_item(struct cache_tree *chunk_cache,
* wrong onwer(3) out of chunk tree, to pass both chunk tree check
* and owner<->key_type check.
*/
- ret = btrfs_check_chunk_valid(global_info->tree_root, eb, chunk, slot,
+ ret = btrfs_check_chunk_valid(global_info, eb, chunk, slot,
key->offset);
if (ret < 0) {
error("chunk(%llu, %llu) is not valid, ignore it",
@@ -10927,7 +10927,7 @@ static int check_dev_extent_item(struct btrfs_fs_info *fs_info,
l = path.nodes[0];
chunk = btrfs_item_ptr(l, path.slots[0], struct btrfs_chunk);
- ret = btrfs_check_chunk_valid(chunk_root, l, chunk, path.slots[0],
+ ret = btrfs_check_chunk_valid(fs_info, l, chunk, path.slots[0],
chunk_key.offset);
if (ret < 0)
goto out;
@@ -11185,7 +11185,7 @@ static int check_chunk_item(struct btrfs_fs_info *fs_info,
chunk = btrfs_item_ptr(eb, slot, struct btrfs_chunk);
length = btrfs_chunk_length(eb, chunk);
chunk_end = chunk_key.offset + length;
- ret = btrfs_check_chunk_valid(extent_root, eb, chunk, slot,
+ ret = btrfs_check_chunk_valid(fs_info, eb, chunk, slot,
chunk_key.offset);
if (ret < 0) {
error("chunk[%llu %llu) is invalid", chunk_key.offset,