]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - mm/vmstat.c
mm: introduce for_each_populated_zone() macro
[mirror_ubuntu-zesty-kernel.git] / mm / vmstat.c
index 8cd81ea1ddc138cf60b93c19554a68cc645160df..9826766f127447c5ee94aec4a86566258a3babf0 100644 (file)
@@ -135,11 +135,7 @@ static void refresh_zone_stat_thresholds(void)
        int cpu;
        int threshold;
 
-       for_each_zone(zone) {
-
-               if (!zone->present_pages)
-                       continue;
-
+       for_each_populated_zone(zone) {
                threshold = calculate_threshold(zone);
 
                for_each_online_cpu(cpu)
@@ -301,12 +297,9 @@ void refresh_cpu_vm_stats(int cpu)
        int i;
        int global_diff[NR_VM_ZONE_STAT_ITEMS] = { 0, };
 
-       for_each_zone(zone) {
+       for_each_populated_zone(zone) {
                struct per_cpu_pageset *p;
 
-               if (!populated_zone(zone))
-                       continue;
-
                p = zone_pcp(zone, cpu);
 
                for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)