diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1456,7 +1456,14 @@ static void *kmem_getpages(struct kmem_cache *cachep, gfp_t flags, int nodeid) | |||
1456 | int i; | 1456 | int i; |
1457 | 1457 | ||
1458 | flags |= cachep->gfpflags; | 1458 | flags |= cachep->gfpflags; |
1459 | #ifndef CONFIG_MMU | ||
1460 | /* nommu uses slab's for process anonymous memory allocations, so | ||
1461 | * requires __GFP_COMP to properly refcount higher order allocations" | ||
1462 | */ | ||
1463 | page = alloc_pages_node(nodeid, (flags | __GFP_COMP), cachep->gfporder); | ||
1464 | #else | ||
1459 | page = alloc_pages_node(nodeid, flags, cachep->gfporder); | 1465 | page = alloc_pages_node(nodeid, flags, cachep->gfporder); |
1466 | #endif | ||
1460 | if (!page) | 1467 | if (!page) |
1461 | return NULL; | 1468 | return NULL; |
1462 | addr = page_address(page); | 1469 | addr = page_address(page); |