提交 be283b2e 编写于 作者: L Liu Bo 提交者: Josef Bacik

Btrfs: use helper to cleanup tree roots

free_root_pointers() has been introduced to cleanup all of tree roots,
so just use it instead.
Signed-off-by: NLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: NDavid Sterba <dsterba@suse.cz>
Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
上级 b0496686
......@@ -3426,20 +3426,7 @@ int close_ctree(struct btrfs_root *root)
percpu_counter_sum(&fs_info->delalloc_bytes));
}
free_extent_buffer(fs_info->extent_root->node);
free_extent_buffer(fs_info->extent_root->commit_root);
free_extent_buffer(fs_info->tree_root->node);
free_extent_buffer(fs_info->tree_root->commit_root);
free_extent_buffer(fs_info->chunk_root->node);
free_extent_buffer(fs_info->chunk_root->commit_root);
free_extent_buffer(fs_info->dev_root->node);
free_extent_buffer(fs_info->dev_root->commit_root);
free_extent_buffer(fs_info->csum_root->node);
free_extent_buffer(fs_info->csum_root->commit_root);
if (fs_info->quota_root) {
free_extent_buffer(fs_info->quota_root->node);
free_extent_buffer(fs_info->quota_root->commit_root);
}
free_root_pointers(fs_info, 1);
btrfs_free_block_groups(fs_info);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册