aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/snapshot.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2007-02-10 04:43:02 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:17 -0500
commitd23ad42324cc4378132e51f2fc5c9ba6cbe75182 (patch)
tree6844416befb3988e432e8f422f3a369e2f760d39 /kernel/power/snapshot.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/snapshot.c')
-rw-r--r--kernel/power/snapshot.c4
1 files changed, 2 insertions, 2 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);