fix raw_aio_remove (Stefano Stabellini)

Hi all,
this small patch fixes a bug in the list iteration of raw_aio_remove.
Cheers,

Stefano

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6644 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
aliguori 2009-02-26 16:40:19 +00:00
parent 18307f2659
commit 7a11b22eab
1 changed files with 2 additions and 1 deletions

View File

@ -604,13 +604,14 @@ static void raw_aio_remove(RawAIOCB *acb)
pacb = &posix_aio_state->first_aio; pacb = &posix_aio_state->first_aio;
for(;;) { for(;;) {
if (*pacb == NULL) { if (*pacb == NULL) {
fprintf(stderr, "raw_aio_remove: aio request not found!\n");
break; break;
} else if (*pacb == acb) { } else if (*pacb == acb) {
*pacb = acb->next; *pacb = acb->next;
qemu_aio_release(acb); qemu_aio_release(acb);
break; break;
} }
pacb = &acb->next; pacb = &(*pacb)->next;
} }
} }