Patchwork [v6,07/20] block: vhdx code movement - move vhdx_close() above vhdx_open()

login
register
mail settings
Submitter Jeff Cody
Date Sept. 25, 2013, 9:02 p.m.
Message ID <3ddc239e4bdb45c2eda6e807a9997a8d06003d5d.1380141614.git.jcody@redhat.com>
Download mbox | patch
Permalink /patch/278016/
State New
Headers show

Comments

Jeff Cody - Sept. 25, 2013, 9:02 p.m.
Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 block/vhdx.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Patch

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),