Commit 31cb852809c86541c817538c98003678546dfa58
Exists in
master
and in
7 other branches
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM / Hibernate: Fix free_unnecessary_pages()
Showing 1 changed file Side-by-side Diff
kernel/power/snapshot.c
... | ... | @@ -1211,7 +1211,11 @@ |
1211 | 1211 | to_free_highmem = alloc_highmem - save; |
1212 | 1212 | } else { |
1213 | 1213 | to_free_highmem = 0; |
1214 | - to_free_normal -= save - alloc_highmem; | |
1214 | + save -= alloc_highmem; | |
1215 | + if (to_free_normal > save) | |
1216 | + to_free_normal -= save; | |
1217 | + else | |
1218 | + to_free_normal = 0; | |
1215 | 1219 | } |
1216 | 1220 | |
1217 | 1221 | memory_bm_position_reset(©_bm); |