diff options
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c index 7e9e508263fb..084184e706c6 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1362,6 +1362,8 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) * so we fall-back to the minimum order allocation. */ alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL; + if ((alloc_gfp & __GFP_WAIT) && oo_order(oo) > oo_order(s->min)) + alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~__GFP_WAIT; page = alloc_slab_page(s, alloc_gfp, node, oo); if (unlikely(!page)) { |