aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 1aca6cebbb78..26ef24076b76 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -806,6 +806,14 @@ extern struct zone *next_zone(struct zone *zone);
806 zone; \ 806 zone; \
807 zone = next_zone(zone)) 807 zone = next_zone(zone))
808 808
809#define for_each_populated_zone(zone) \
810 for (zone = (first_online_pgdat())->node_zones; \
811 zone; \
812 zone = next_zone(zone)) \
813 if (!populated_zone(zone)) \
814 ; /* do nothing */ \
815 else
816
809static inline struct zone *zonelist_zone(struct zoneref *zoneref) 817static inline struct zone *zonelist_zone(struct zoneref *zoneref)
810{ 818{
811 return zoneref->zone; 819 return zoneref->zone;