Commit 7a11b22eab559e24540059d46c70f4feffe052d7
1 parent
18307f26
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
Showing
1 changed file
with
2 additions
and
1 deletions
block-raw-posix.c
... | ... | @@ -604,13 +604,14 @@ static void raw_aio_remove(RawAIOCB *acb) |
604 | 604 | pacb = &posix_aio_state->first_aio; |
605 | 605 | for(;;) { |
606 | 606 | if (*pacb == NULL) { |
607 | + fprintf(stderr, "raw_aio_remove: aio request not found!\n"); | |
607 | 608 | break; |
608 | 609 | } else if (*pacb == acb) { |
609 | 610 | *pacb = acb->next; |
610 | 611 | qemu_aio_release(acb); |
611 | 612 | break; |
612 | 613 | } |
613 | - pacb = &acb->next; | |
614 | + pacb = &(*pacb)->next; | |
614 | 615 | } |
615 | 616 | } |
616 | 617 | ... | ... |