aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/block.c b/block.c
index a17baab1d0..2c87186ecf 100644
--- a/block.c
+++ b/block.c
@@ -2091,7 +2091,7 @@ int bdrv_reopen_multiple(AioContext *ctx, BlockReopenQueue *bs_queue, Error **er
assert(bs_queue != NULL);
aio_context_release(ctx);
- bdrv_drain_all();
+ bdrv_drain_all_begin();
aio_context_acquire(ctx);
QSIMPLEQ_FOREACH(bs_entry, bs_queue, entry) {
@@ -2122,6 +2122,9 @@ cleanup:
g_free(bs_entry);
}
g_free(bs_queue);
+
+ bdrv_drain_all_end();
+
return ret;
}