mirror of https://github.com/proxmox/mirror_qemu
qed: Remove recursion in qed_aio_next_io()
Instead of calling itself recursively as the last thing, just convert qed_aio_next_io() into a loop. This patch is best reviewed with 'git show -w' because most of it is just whitespace changes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>master
parent
dddf8db10b
commit
018598747c
|
@ -1280,6 +1280,7 @@ static void qed_aio_next_io(QEDAIOCB *acb)
|
|||
size_t len;
|
||||
int ret;
|
||||
|
||||
while (1) {
|
||||
trace_qed_aio_next_io(s, acb, 0, acb->cur_pos + acb->cur_qiov.size);
|
||||
|
||||
if (acb->backing_qiov) {
|
||||
|
@ -1318,7 +1319,7 @@ static void qed_aio_next_io(QEDAIOCB *acb)
|
|||
}
|
||||
return;
|
||||
}
|
||||
qed_aio_next_io(acb);
|
||||
}
|
||||
}
|
||||
|
||||
static BlockAIOCB *qed_aio_setup(BlockDriverState *bs,
|
||||
|
|
Loading…
Reference in New Issue