Skip to content

Commit b8ae0eb

Browse files
amit3smstsirkin
authored andcommitted
virtio: balloon: let host know of updated balloon size before module removal
When the balloon module is removed, we deflate the balloon, reclaiming all the pages that were given to the host. However, we don't update the config values for the new balloon size, resulting in the host showing outdated balloon values. The size update is done after each leak and fill operation, only the module removal case was left out. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent fa8b66c commit b8ae0eb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/virtio/virtio_balloon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ static void __devexit virtballoon_remove(struct virtio_device *vdev)
390390
/* There might be pages left in the balloon: free them. */
391391
while (vb->num_pages)
392392
leak_balloon(vb, vb->num_pages);
393+
update_balloon_size(vb);
393394

394395
/* Now we reset the device so we can clean up the queues. */
395396
vdev->config->reset(vdev);

0 commit comments

Comments
 (0)