diff options
Diffstat (limited to 'block/null.c')
-rw-r--r-- | block/null.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/null.c b/block/null.c index b300390944..356209a42b 100644 --- a/block/null.c +++ b/block/null.c @@ -141,7 +141,11 @@ static void null_bh_cb(void *opaque) static void null_timer_cb(void *opaque) { NullAIOCB *acb = opaque; + AioContext *ctx = bdrv_get_aio_context(acb->common.bs); + + aio_context_acquire(ctx); acb->common.cb(acb->common.opaque, 0); + aio_context_release(ctx); timer_deinit(&acb->timer); qemu_aio_unref(acb); } |