diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3252,6 +3252,7 @@ void *fallback_alloc(struct kmem_cache *cache, gfp_t flags) | |||
3252 | struct zone **z; | 3252 | struct zone **z; |
3253 | void *obj = NULL; | 3253 | void *obj = NULL; |
3254 | int nid; | 3254 | int nid; |
3255 | gfp_t local_flags = (flags & GFP_LEVEL_MASK); | ||
3255 | 3256 | ||
3256 | retry: | 3257 | retry: |
3257 | /* | 3258 | /* |
@@ -3275,7 +3276,12 @@ retry: | |||
3275 | * We may trigger various forms of reclaim on the allowed | 3276 | * We may trigger various forms of reclaim on the allowed |
3276 | * set and go into memory reserves if necessary. | 3277 | * set and go into memory reserves if necessary. |
3277 | */ | 3278 | */ |
3279 | if (local_flags & __GFP_WAIT) | ||
3280 | local_irq_enable(); | ||
3281 | kmem_flagcheck(cache, flags); | ||
3278 | obj = kmem_getpages(cache, flags, -1); | 3282 | obj = kmem_getpages(cache, flags, -1); |
3283 | if (local_flags & __GFP_WAIT) | ||
3284 | local_irq_disable(); | ||
3279 | if (obj) { | 3285 | if (obj) { |
3280 | /* | 3286 | /* |
3281 | * Insert into the appropriate per node queues | 3287 | * Insert into the appropriate per node queues |