Skip to contentSkip to conversation

[6644] fix raw_aio_remove (Stefano Stabellini)

Qemu-devel Anthony Liguori 1 participant 1 message Feb 26, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6644

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6644
Author:   aliguori
Date:     2009-02-26 16:40:19 +0000 (Thu, 26 Feb 2009)

Log Message:
-----------
fix raw_aio_remove (Stefano Stabellini)

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

Stefano

Modified Paths:
--------------
trunk/block-raw-posix.c

Modified: trunk/block-raw-posix.c
===================================================================

block-raw-posix.c +2 -1
@@ -604,13 +604,14 @@
     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;
     }
 }