diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/snapshot.c | 4 | ||||
-rw-r--r-- | kernel/power/swsusp.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index c024606221c4..fc53ad068128 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -591,7 +591,7 @@ static unsigned int count_free_highmem_pages(void) | |||
591 | 591 | ||
592 | for_each_zone(zone) | 592 | for_each_zone(zone) |
593 | if (populated_zone(zone) && is_highmem(zone)) | 593 | if (populated_zone(zone) && is_highmem(zone)) |
594 | cnt += zone->free_pages; | 594 | cnt += zone_page_state(zone, NR_FREE_PAGES); |
595 | 595 | ||
596 | return cnt; | 596 | return cnt; |
597 | } | 597 | } |
@@ -869,7 +869,7 @@ static int enough_free_mem(unsigned int nr_pages, unsigned int nr_highmem) | |||
869 | for_each_zone(zone) { | 869 | for_each_zone(zone) { |
870 | meta += snapshot_additional_pages(zone); | 870 | meta += snapshot_additional_pages(zone); |
871 | if (!is_highmem(zone)) | 871 | if (!is_highmem(zone)) |
872 | free += zone->free_pages; | 872 | free += zone_page_state(zone, NR_FREE_PAGES); |
873 | } | 873 | } |
874 | 874 | ||
875 | nr_pages += count_pages_for_highmem(nr_highmem); | 875 | nr_pages += count_pages_for_highmem(nr_highmem); |
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 31aa0390c777..7fb834397a0d 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
@@ -230,9 +230,10 @@ int swsusp_shrink_memory(void) | |||
230 | for_each_zone (zone) | 230 | for_each_zone (zone) |
231 | if (populated_zone(zone)) { | 231 | if (populated_zone(zone)) { |
232 | if (is_highmem(zone)) { | 232 | if (is_highmem(zone)) { |
233 | highmem_size -= zone->free_pages; | 233 | highmem_size -= |
234 | zone_page_state(zone, NR_FREE_PAGES); | ||
234 | } else { | 235 | } else { |
235 | tmp -= zone->free_pages; | 236 | tmp -= zone_page_state(zone, NR_FREE_PAGES); |
236 | tmp += zone->lowmem_reserve[ZONE_NORMAL]; | 237 | tmp += zone->lowmem_reserve[ZONE_NORMAL]; |
237 | tmp += snapshot_additional_pages(zone); | 238 | tmp += snapshot_additional_pages(zone); |
238 | } | 239 | } |