summaryrefslogtreecommitdiff
path: root/kernel/power/swsusp.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2007-02-10 01:43:02 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 10:51:17 -0800
commitd23ad42324cc4378132e51f2fc5c9ba6cbe75182 (patch)
tree6844416befb3988e432e8f422f3a369e2f760d39 /kernel/power/swsusp.c
parentc878538598d1e7ab41ecc0de8894e34e2fdef630 (diff)
[PATCH] Use ZVC for free_pages
This is again simplifies some of the VM counter calculations through the use of the ZVC consolidated counters. [michal.k.k.piotrowski@gmail.com: build fix] Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power/swsusp.c')
-rw-r--r--kernel/power/swsusp.c5
1 files changed, 3 insertions, 2 deletions
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)
for_each_zone (zone)
if (populated_zone(zone)) {
if (is_highmem(zone)) {
- highmem_size -= zone->free_pages;
+ highmem_size -=
+ zone_page_state(zone, NR_FREE_PAGES);
} else {
- tmp -= zone->free_pages;
+ tmp -= zone_page_state(zone, NR_FREE_PAGES);
tmp += zone->lowmem_reserve[ZONE_NORMAL];
tmp += snapshot_additional_pages(zone);
}