diff options
Diffstat (limited to 'block/qed.c')
-rw-r--r-- | block/qed.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/block/qed.c b/block/qed.c index 95f1050f8b..8c493bb393 100644 --- a/block/qed.c +++ b/block/qed.c @@ -1000,7 +1000,8 @@ static void qed_aio_write_l1_update(void *opaque, int ret) index = qed_l1_index(s, acb->cur_pos); s->l1_table->offsets[index] = acb->request.l2_table->offset; - qed_write_l1_table(s, index, 1, qed_commit_l2_update, acb); + ret = qed_write_l1_table(s, index, 1); + qed_commit_l2_update(acb, ret); } /** @@ -1027,12 +1028,13 @@ static void qed_aio_write_l2_update(QEDAIOCB *acb, int ret, uint64_t offset) if (need_alloc) { /* Write out the whole new L2 table */ - qed_write_l2_table(s, &acb->request, 0, s->table_nelems, true, - qed_aio_write_l1_update, acb); + ret = qed_write_l2_table(s, &acb->request, 0, s->table_nelems, true); + qed_aio_write_l1_update(acb, ret); } else { /* Write out only the updated part of the L2 table */ - qed_write_l2_table(s, &acb->request, index, acb->cur_nclusters, false, - qed_aio_next_io_cb, acb); + ret = qed_write_l2_table(s, &acb->request, index, acb->cur_nclusters, + false); + qed_aio_next_io(acb, ret); } return; |