Commit b8ae0eb3 authored by Amit Shah's avatar Amit Shah Committed by Michael S. Tsirkin

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: default avatarAmit Shah <>
Signed-off-by: default avatarMichael S. Tsirkin <>
parent fa8b66cc
......@@ -390,6 +390,7 @@ static void __devexit virtballoon_remove(struct virtio_device *vdev)
/* There might be pages left in the balloon: free them. */
while (vb->num_pages)
leak_balloon(vb, vb->num_pages);
/* Now we reset the device so we can clean up the queues. */
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