summaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio_balloon.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2013-12-05 03:34:10 +0100
committerRusty Russell <rusty@rustcorp.com.au>2013-12-05 03:42:39 +0100
commit3459f11a8b16f40f9cde8e4281c2d5dd2ff1a732 (patch)
tree2591a49f6649fdaace3425a7a495011df53acd1e /drivers/virtio/virtio_balloon.c
parentima: store address of template_fmt_copy in a pointer before calling strsep (diff)
downloadlinux-3459f11a8b16f40f9cde8e4281c2d5dd2ff1a732.tar.xz
linux-3459f11a8b16f40f9cde8e4281c2d5dd2ff1a732.zip
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 855e0c5288177bcb193f6f6316952d2490478e1c swapped them in update_balloon_size(). Fix it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Fixes: 855e0c5288177bcb193f6f6316952d2490478e1c
Diffstat (limited to 'drivers/virtio/virtio_balloon.c')
-rw-r--r--drivers/virtio/virtio_balloon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index c444654fc33f..5c4a95b516cf 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -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);
}