From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbXmm-0003KR-9C for qemu-devel@nongnu.org; Wed, 30 Oct 2013 11:34:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbXmg-0003Vz-8x for qemu-devel@nongnu.org; Wed, 30 Oct 2013 11:34:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbXmf-0003Vp-Tm for qemu-devel@nongnu.org; Wed, 30 Oct 2013 11:34:14 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9UFYATU014249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 30 Oct 2013 11:34:12 -0400 From: Jeff Cody Date: Wed, 30 Oct 2013 10:44:44 -0400 Message-Id: In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH v8 07/19] block: vhdx code movement - move vhdx_close() above vhdx_open() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com Signed-off-by: Jeff Cody --- block/vhdx.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 241703a..3f06ce3 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -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), -- 1.8.3.1