mm/balloon_compaction: avoid duplicate page removal
authorWei Wang <wei.w.wang@intel.com>
Thu, 18 Jul 2019 09:27:20 +0000 (17:27 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 22 Jul 2019 15:19:26 +0000 (11:19 -0400)
commitdd422906799f240bfd400a5d376aa43f7b89c38a
tree19f2696f81f32f7e46d3e477086eaaa4defd1c2a
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b
mm/balloon_compaction: avoid duplicate page removal

A #GP is reported in the guest when requesting balloon inflation via
virtio-balloon. The reason is that the virtio-balloon driver has
removed the page from its internal page list (via balloon_page_pop),
but balloon_page_enqueue_one also calls "list_del"  to do the removal.
This is necessary when it's used from balloon_page_enqueue_list, but
not from balloon_page_enqueue.

Move list_del to balloon_page_enqueue, and update comments accordingly.

Fixes: 418a3ab1e778 (mm/balloon_compaction: List interfaces)
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
mm/balloon_compaction.c