diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/snapshot.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index ace5588..06efa54 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -1211,7 +1211,11 @@ static void free_unnecessary_pages(void) to_free_highmem = alloc_highmem - save; } else { to_free_highmem = 0; - to_free_normal -= save - alloc_highmem; + save -= alloc_highmem; + if (to_free_normal > save) + to_free_normal -= save; + else + to_free_normal = 0; } memory_bm_position_reset(©_bm); |