virtio-blk: fix comment for virtio_blk_rw_complete as nalloc is initially -1
The initial value of nalloc is -1, but not 1. Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-id: 1541479952-32355-1-git-send-email-dongli.zhang@oracle.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
5636da7682
commit
e61809ed8a
@ -96,7 +96,7 @@ static void virtio_blk_rw_complete(void *opaque, int ret)
|
|||||||
trace_virtio_blk_rw_complete(vdev, req, ret);
|
trace_virtio_blk_rw_complete(vdev, req, ret);
|
||||||
|
|
||||||
if (req->qiov.nalloc != -1) {
|
if (req->qiov.nalloc != -1) {
|
||||||
/* If nalloc is != 1 req->qiov is a local copy of the original
|
/* If nalloc is != -1 req->qiov is a local copy of the original
|
||||||
* external iovec. It was allocated in submit_requests to be
|
* external iovec. It was allocated in submit_requests to be
|
||||||
* able to merge requests. */
|
* able to merge requests. */
|
||||||
qemu_iovec_destroy(&req->qiov);
|
qemu_iovec_destroy(&req->qiov);
|
||||||
|
Loading…
Reference in New Issue
Block a user