]> Git Repo - qemu.git/commitdiff
qcow2: call CoQueue APIs under CoMutex
authorPaolo Bonzini <[email protected]>
Thu, 29 Jun 2017 13:27:39 +0000 (15:27 +0200)
committerFam Zheng <[email protected]>
Mon, 17 Jul 2017 03:28:15 +0000 (11:28 +0800)
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Message-Id: <20170629132749[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
block/qcow2.c

index c144ea56201d834139b440a5e7029ce1988a37f0..d5790af1e079c75eb9b7bac4aca5be504e0efc73 100644 (file)
@@ -2025,8 +2025,6 @@ static coroutine_fn int qcow2_co_pwritev(BlockDriverState *bs, uint64_t offset,
     ret = 0;
 
 fail:
-    qemu_co_mutex_unlock(&s->lock);
-
     while (l2meta != NULL) {
         QCowL2Meta *next;
 
@@ -2040,6 +2038,8 @@ fail:
         l2meta = next;
     }
 
+    qemu_co_mutex_unlock(&s->lock);
+
     qemu_iovec_destroy(&hd_qiov);
     qemu_vfree(cluster_data);
     trace_qcow2_writev_done_req(qemu_coroutine_self(), ret);
This page took 0.031937 seconds and 4 git commands to generate.