balloon: Allow multiple inhibit users
commit01ccbec7bdf6f89f1b7d46dda05e4c1fd2dd5ade
authorAlex Williamson <alex.williamson@redhat.com>
Fri, 17 Aug 2018 15:27:15 +0000 (17 09:27 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 17 Aug 2018 15:27:15 +0000 (17 09:27 -0600)
tree0340db7ce0187aff3b3fde1a9d220568dc8cc163
parent0abaa41d936becd914a16ee1fe2a981d96d19428
balloon: Allow multiple inhibit users

A simple true/false internal state does not allow multiple users.  Fix
this within the existing interface by converting to a counter, so long
as the counter is elevated, ballooning is inhibited.

Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
balloon.c