From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZphg-0007kS-Lp for qemu-devel@nongnu.org; Wed, 18 Feb 2009 11:55:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZphe-0007k3-JW for qemu-devel@nongnu.org; Wed, 18 Feb 2009 11:55:19 -0500 Received: from [199.232.76.173] (port=41298 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZphe-0007k0-Co for qemu-devel@nongnu.org; Wed, 18 Feb 2009 11:55:18 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:38504) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LZphe-0007JK-2E for qemu-devel@nongnu.org; Wed, 18 Feb 2009 11:55:18 -0500 Message-ID: <499C3D4D.9060108@eu.citrix.com> Date: Wed, 18 Feb 2009 16:54:37 +0000 From: Stefano Stabellini MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] fix raw_aio_remove Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" Hi all, this small patch fixes a bug in the list iteration of raw_aio_remove. Cheers, Stefano Signed-off-by: Stefano Stabellini diff --git a/block-raw-posix.c b/block-raw-posix.c index 620791b..85ca704 100644 --- a/block-raw-posix.c +++ b/block-raw-posix.c @@ -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; } }