]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
fix raw_aio_remove (Stefano Stabellini)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 26 Feb 2009 16:40:19 +0000 (16:40 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 26 Feb 2009 16:40:19 +0000 (16:40 +0000)
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

block-raw-posix.c

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