From patchwork Wed Sep 25 21:02:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 278016 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 12EC02C009D for ; Thu, 26 Sep 2013 07:08:43 +1000 (EST) Received: from localhost ([::1]:54759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOwK8-0004py-RS for incoming@patchwork.ozlabs.org; Wed, 25 Sep 2013 17:08:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOwFD-0000HI-Et for qemu-devel@nongnu.org; Wed, 25 Sep 2013 17:03:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOwF7-0004ts-GY for qemu-devel@nongnu.org; Wed, 25 Sep 2013 17:03:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOwF7-0004ti-8o for qemu-devel@nongnu.org; Wed, 25 Sep 2013 17:03:29 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8PL3SA8023387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Sep 2013 17:03:28 -0400 Received: from localhost ([10.3.112.14]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8PL3QgX005244 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 25 Sep 2013 17:03:28 -0400 From: Jeff Cody To: qemu-devel@nongnu.org Date: Wed, 25 Sep 2013 17:02:52 -0400 Message-Id: <3ddc239e4bdb45c2eda6e807a9997a8d06003d5d.1380141614.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, famz@redhat.com, stefanha@redhat.com Subject: [Qemu-devel] [PATCH v6 07/20] block: vhdx code movement - move vhdx_close() above vhdx_open() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Jeff Cody --- block/vhdx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 057bc9c..9dc1e87 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -777,6 +777,15 @@ 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); +} + static int vhdx_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { @@ -1028,15 +1037,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); -} - static BlockDriver bdrv_vhdx = { .format_name = "vhdx", .instance_size = sizeof(BDRVVHDXState),