diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2013-12-04 21:34:10 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-12-04 21:42:39 -0500 |
commit | 3459f11a8b16f40f9cde8e4281c2d5dd2ff1a732 (patch) | |
tree | 2591a49f6649fdaace3425a7a495011df53acd1e /drivers | |
parent | af91706d5ddecb4a9858cca9e90d463037cfd498 (diff) |
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')
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 2 |
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) | |||
285 | { | 285 | { |
286 | __le32 actual = cpu_to_le32(vb->num_pages); | 286 | __le32 actual = cpu_to_le32(vb->num_pages); |
287 | 287 | ||
288 | virtio_cwrite(vb->vdev, struct virtio_balloon_config, num_pages, | 288 | virtio_cwrite(vb->vdev, struct virtio_balloon_config, actual, |
289 | &actual); | 289 | &actual); |
290 | } | 290 | } |
291 | 291 | ||