Drivers: hv: balloon: Correctly update onlined page count
authorAlex Ng <alexng@messages.microsoft.com>
Sun, 6 Aug 2017 20:12:53 +0000 (13:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2017 16:14:42 +0000 (09:14 -0700)
commit6df8d9aaf3afe25aacf20c69022a4c6d57b77a95
tree6a361758fbcf7304d46b07a60bb89d678cd1d77e
parentea81fdf0981d9a4a998a015d325bed67624811f7
Drivers: hv: balloon: Correctly update onlined page count

Previously, num_pages_onlined was updated using value from memory online
notifier. This is incorrect because they assume that all hot-added pages
are online, even though we only online the amount that's backed by the
host. We should update num_pages_onlined only when the balloon driver
marks a page as online.

Signed-off-by: Alex Ng <alexng@messages.microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv_balloon.c