diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -3152,12 +3152,15 @@ void *fallback_alloc(struct kmem_cache *cache, gfp_t flags) | |||
3152 | struct zone **z; | 3152 | struct zone **z; |
3153 | void *obj = NULL; | 3153 | void *obj = NULL; |
3154 | 3154 | ||
3155 | for (z = zonelist->zones; *z && !obj; z++) | 3155 | for (z = zonelist->zones; *z && !obj; z++) { |
3156 | int nid = zone_to_nid(*z); | ||
3157 | |||
3156 | if (zone_idx(*z) <= ZONE_NORMAL && | 3158 | if (zone_idx(*z) <= ZONE_NORMAL && |
3157 | cpuset_zone_allowed(*z, flags)) | 3159 | cpuset_zone_allowed(*z, flags) && |
3160 | cache->nodelists[nid]) | ||
3158 | obj = __cache_alloc_node(cache, | 3161 | obj = __cache_alloc_node(cache, |
3159 | flags | __GFP_THISNODE, | 3162 | flags | __GFP_THISNODE, nid); |
3160 | zone_to_nid(*z)); | 3163 | } |
3161 | return obj; | 3164 | return obj; |
3162 | } | 3165 | } |
3163 | 3166 | ||