virtio-blk: fix the list operation in virtio_blk_load().
authorYoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
Mon, 21 Jun 2010 08:50:01 +0000 (17:50 +0900)
committerKevin Wolf <kwolf@redhat.com>
Tue, 22 Jun 2010 12:38:02 +0000 (14:38 +0200)
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 <tamura.yoshiaki@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/virtio-blk.c

index 75878ebe3c76cd90c9e836a6f3148b98a5c0d745..0bf929aba91fdb36205e7cd1b10e8aacb3432e01 100644 (file)
@@ -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;