diff options
Diffstat (limited to 'block/qed.c')
-rw-r--r-- | block/qed.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/qed.c b/block/qed.c index a21d025..db8295d 100644 --- a/block/qed.c +++ b/block/qed.c @@ -942,6 +942,7 @@ static void qed_update_l2_table(BDRVQEDState *s, QEDTable *table, int index, static void qed_aio_complete_bh(void *opaque) { QEDAIOCB *acb = opaque; + BDRVQEDState *s = acb_to_s(acb); BlockCompletionFunc *cb = acb->common.cb; void *user_opaque = acb->common.opaque; int ret = acb->bh_ret; @@ -949,7 +950,9 @@ static void qed_aio_complete_bh(void *opaque) qemu_aio_unref(acb); /* Invoke callback */ + qed_acquire(s); cb(user_opaque, ret); + qed_release(s); } static void qed_aio_complete(QEDAIOCB *acb, int ret) |