aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/test-block-iothread.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test-block-iothread.c')
-rw-r--r--tests/unit/test-block-iothread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/test-block-iothread.c b/tests/unit/test-block-iothread.c
index 96fd21c00a..def0709b2b 100644
--- a/tests/unit/test-block-iothread.c
+++ b/tests/unit/test-block-iothread.c
@@ -582,10 +582,10 @@ static void test_attach_blockjob(void)
aio_poll(qemu_get_aio_context(), false);
}
- aio_context_acquire(ctx);
WITH_JOB_LOCK_GUARD() {
job_complete_sync_locked(&tjob->common.job, &error_abort);
}
+ aio_context_acquire(ctx);
blk_set_aio_context(blk, qemu_get_aio_context(), &error_abort);
aio_context_release(ctx);