summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2017-06-13 17:19:31 +0800
committerDavid Sterba <dsterba@suse.com>2017-07-12 17:53:44 +0200
commit37ddab31fd0c11b960baf14484567d4f7286874b (patch)
tree14371cbbb5f4b658882b3d5feafb0628c9e6e5fd /volumes.c
parent5b4c9ccce9b6f9a94431f1a571e2299f46c74bf6 (diff)
btrfs-progs: Refactor btrfs_add_system_chunk 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 'volumes.c')
-rw-r--r--volumes.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/volumes.c b/volumes.c
index db8b931..5b3b142 100644
--- a/volumes.c
+++ b/volumes.c
@@ -690,11 +690,10 @@ out:
return ret;
}
-int btrfs_add_system_chunk(struct btrfs_root *root,
- struct btrfs_key *key,
+int btrfs_add_system_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
struct btrfs_chunk *chunk, int item_size)
{
- struct btrfs_super_block *super_copy = root->fs_info->super_copy;
+ struct btrfs_super_block *super_copy = fs_info->super_copy;
struct btrfs_disk_key disk_key;
u32 array_size;
u8 *ptr;
@@ -1083,7 +1082,7 @@ again:
BUG_ON(ret);
if (type & BTRFS_BLOCK_GROUP_SYSTEM) {
- ret = btrfs_add_system_chunk(chunk_root, &key,
+ ret = btrfs_add_system_chunk(info, &key,
chunk, btrfs_chunk_item_size(num_stripes));
BUG_ON(ret);
}