diff options
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r-- | mm/oom_kill.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index beb592fe9389..2c93502cfcb4 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -175,12 +175,14 @@ static inline enum oom_constraint constrained_alloc(struct zonelist *zonelist, | |||
175 | gfp_t gfp_mask) | 175 | gfp_t gfp_mask) |
176 | { | 176 | { |
177 | #ifdef CONFIG_NUMA | 177 | #ifdef CONFIG_NUMA |
178 | struct zone *zone; | ||
178 | struct zone **z; | 179 | struct zone **z; |
180 | enum zone_type high_zoneidx = gfp_zone(gfp_mask); | ||
179 | nodemask_t nodes = node_states[N_HIGH_MEMORY]; | 181 | nodemask_t nodes = node_states[N_HIGH_MEMORY]; |
180 | 182 | ||
181 | for (z = zonelist->zones; *z; z++) | 183 | for_each_zone_zonelist(zone, z, zonelist, high_zoneidx) |
182 | if (cpuset_zone_allowed_softwall(*z, gfp_mask)) | 184 | if (cpuset_zone_allowed_softwall(zone, gfp_mask)) |
183 | node_clear(zone_to_nid(*z), nodes); | 185 | node_clear(zone_to_nid(zone), nodes); |
184 | else | 186 | else |
185 | return CONSTRAINT_CPUSET; | 187 | return CONSTRAINT_CPUSET; |
186 | 188 | ||