Skip to contentSkip to conversation

fix raw_aio_remove

PATCH Applied Stefano Stabellini 2 participants 2 messages Feb 18, 2009 – Feb 26, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix raw_aio_remove

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

Stefano

block-raw-posix.c +2 -1
index 620791b..85ca704 100644
@@ -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;
     }
 }
 
#1 lore raw
Quoted 4 lines · Stefano Stabellini

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

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 29 lines

Stefano

block-raw-posix.c +2 -1
index 620791b..85ca704 100644
@@ -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;
     }
 }