aboutsummaryrefslogtreecommitdiff
path: root/nbd
diff options
context:
space:
mode:
Diffstat (limited to 'nbd')
-rw-r--r--nbd/server.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nbd/server.c b/nbd/server.c
index eead339a2c..3596e68191 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -671,7 +671,9 @@ NBDExport *nbd_export_new(BlockBackend *blk, off_t dev_offset, off_t size,
* that BDRV_O_INCOMING is cleared and the image is ready for write
* access since the export could be available before migration handover.
*/
+ aio_context_acquire(exp->ctx);
blk_invalidate_cache(blk, NULL);
+ aio_context_release(exp->ctx);
return exp;
fail: