Commit 3459f11a authored by Luiz Capitulino's avatar Luiz Capitulino Committed by Rusty Russell

virtio_balloon: update_balloon_size(): update correct field

According to the virtio spec, the device configuration field
that should be updated after an inflation or deflation
operation is the 'actual' field, not the 'num_pages' one.

Commit 855e0c52 swapped them
in update_balloon_size(). Fix it.
Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Fixes: 855e0c52
parent af91706d
......@@ -285,7 +285,7 @@ static void update_balloon_size(struct virtio_balloon *vb)
{
__le32 actual = cpu_to_le32(vb->num_pages);
virtio_cwrite(vb->vdev, struct virtio_balloon_config, num_pages,
virtio_cwrite(vb->vdev, struct virtio_balloon_config, actual,
&actual);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment