From patchwork Tue Jun 22 14:09:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [12/14] virtio-blk: fix the list operation in virtio_blk_load(). Date: Tue, 22 Jun 2010 04:09:31 -0000 From: Kevin Wolf X-Patchwork-Id: 56512 Message-Id: <1277215773-27357-13-git-send-email-kwolf@redhat.com> To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Yoshiaki Tamura Although it is really rare to get in to the while loop, the list operation in the loop is obviously wrong. Signed-off-by: Yoshiaki Tamura Signed-off-by: Kevin Wolf --- hw/virtio-blk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 75878eb..0bf929a 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -470,7 +470,7 @@ static int virtio_blk_load(QEMUFile *f, void *opaque, int version_id) VirtIOBlockReq *req = virtio_blk_alloc_request(s); qemu_get_buffer(f, (unsigned char*)&req->elem, sizeof(req->elem)); req->next = s->rq; - s->rq = req->next; + s->rq = req; } return 0;