diff options
Diffstat (limited to 'drivers/hv')
-rw-r--r-- | drivers/hv/hv_balloon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 74312c88534a..4052ad8255fa 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c | |||
@@ -1155,7 +1155,7 @@ static void balloon_up(struct work_struct *dummy) | |||
1155 | floor = compute_balloon_floor(); | 1155 | floor = compute_balloon_floor(); |
1156 | 1156 | ||
1157 | /* Refuse to balloon below the floor, keep the 2M granularity. */ | 1157 | /* Refuse to balloon below the floor, keep the 2M granularity. */ |
1158 | if (val.freeram - num_pages < floor) { | 1158 | if (val.freeram < num_pages || val.freeram - num_pages < floor) { |
1159 | num_pages = val.freeram > floor ? (val.freeram - floor) : 0; | 1159 | num_pages = val.freeram > floor ? (val.freeram - floor) : 0; |
1160 | num_pages -= num_pages % PAGES_IN_2M; | 1160 | num_pages -= num_pages % PAGES_IN_2M; |
1161 | } | 1161 | } |