提交 c46415af 编写于 作者: J Jeff Cody 提交者: Stefan Hajnoczi

block: vhdx code movement - move vhdx_close() above vhdx_open()

Signed-off-by: NJeff Cody <jcody@redhat.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 c3906c5e
......@@ -778,6 +778,17 @@ exit:
}
static void vhdx_close(BlockDriverState *bs)
{
BDRVVHDXState *s = bs->opaque;
qemu_vfree(s->headers[0]);
qemu_vfree(s->headers[1]);
qemu_vfree(s->bat);
qemu_vfree(s->parent_entries);
migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
}
static int vhdx_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
......@@ -1035,17 +1046,6 @@ static coroutine_fn int vhdx_co_writev(BlockDriverState *bs, int64_t sector_num,
}
static void vhdx_close(BlockDriverState *bs)
{
BDRVVHDXState *s = bs->opaque;
qemu_vfree(s->headers[0]);
qemu_vfree(s->headers[1]);
qemu_vfree(s->bat);
qemu_vfree(s->parent_entries);
migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
}
static BlockDriver bdrv_vhdx = {
.format_name = "vhdx",
.instance_size = sizeof(BDRVVHDXState),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册