summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorCon Kolivas <kernel@kolivas.org>2006-01-06 09:11:15 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 17:33:28 +0100
commitf3fe65122da05e1cd4c9140340d96ea2f95d0c49 (patch)
tree65f2bcdb0a9665123b5083d3aea7dae483593cbc /mm/page_alloc.c
parent[PATCH] consolidate lru_add_drain() and lru_drain_cache() (diff)
downloadlinux-f3fe65122da05e1cd4c9140340d96ea2f95d0c49.tar.xz
linux-f3fe65122da05e1cd4c9140340d96ea2f95d0c49.zip
[PATCH] mm: add populated_zone() helper
There are numerous places we check whether a zone is populated or not. Provide a helper function to check for populated zones and convert all checks for zone->present_pages. Signed-off-by: Con Kolivas <kernel@kolivas.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b9fd2c238f13..8f3de5af92dd 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1358,7 +1358,7 @@ void show_free_areas(void)
show_node(zone);
printk("%s per-cpu:", zone->name);
- if (!zone->present_pages) {
+ if (!populated_zone(zone)) {
printk(" empty\n");
continue;
} else
@@ -1435,7 +1435,7 @@ void show_free_areas(void)
show_node(zone);
printk("%s: ", zone->name);
- if (!zone->present_pages) {
+ if (!populated_zone(zone)) {
printk("empty\n");
continue;
}
@@ -2134,7 +2134,7 @@ static int frag_show(struct seq_file *m, void *arg)
int order;
for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; ++zone) {
- if (!zone->present_pages)
+ if (!populated_zone(zone))
continue;
spin_lock_irqsave(&zone->lock, flags);
@@ -2167,7 +2167,7 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; zone++) {
int i;
- if (!zone->present_pages)
+ if (!populated_zone(zone))
continue;
spin_lock_irqsave(&zone->lock, flags);