aboutsummaryrefslogtreecommitdiff
path: root/balloon.c
diff options
context:
space:
mode:
Diffstat (limited to 'balloon.c')
-rw-r--r--balloon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/balloon.c b/balloon.c
index f104b42961..5fff79523a 100644
--- a/balloon.c
+++ b/balloon.c
@@ -40,7 +40,8 @@ static int balloon_inhibit_count;
bool qemu_balloon_is_inhibited(void)
{
- return atomic_read(&balloon_inhibit_count) > 0;
+ return atomic_read(&balloon_inhibit_count) > 0 ||
+ ram_block_discard_is_disabled();
}
void qemu_balloon_inhibit(bool state)