diff options
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r-- | include/linux/mmzone.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index e6aacf77986a..186ec6ab334d 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -800,6 +800,14 @@ extern struct zone *next_zone(struct zone *zone); | |||
800 | zone; \ | 800 | zone; \ |
801 | zone = next_zone(zone)) | 801 | zone = next_zone(zone)) |
802 | 802 | ||
803 | #define for_each_populated_zone(zone) \ | ||
804 | for (zone = (first_online_pgdat())->node_zones; \ | ||
805 | zone; \ | ||
806 | zone = next_zone(zone)) \ | ||
807 | if (!populated_zone(zone)) \ | ||
808 | ; /* do nothing */ \ | ||
809 | else | ||
810 | |||
803 | static inline struct zone *zonelist_zone(struct zoneref *zoneref) | 811 | static inline struct zone *zonelist_zone(struct zoneref *zoneref) |
804 | { | 812 | { |
805 | return zoneref->zone; | 813 | return zoneref->zone; |