Skip to content

Commit

Permalink
virtio_balloon: update_balloon_size(): update correct field
Browse files Browse the repository at this point in the history
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 855e0c5 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: 855e0c5
  • Loading branch information
Luiz Capitulino authored and Rusty Russell committed Dec 5, 2013
1 parent af91706 commit 3459f11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/virtio/virtio_balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 3459f11

Please sign in to comment.