提交 95f85989 编写于 作者: P Pekka Enberg

SLUB: Don't print out OOM warning for __GFP_NOFAIL

We must check for __GFP_NOFAIL like the page allocator does; otherwise we end
up with false positives. While at it, add the printk_ratelimit() check in SLUB
as well.

Cc: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
上级 26c02cf0
......@@ -1631,7 +1631,8 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
c->page = new;
goto load_freelist;
}
slab_out_of_memory(s, gfpflags, node);
if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())
slab_out_of_memory(s, gfpflags, node);
return NULL;
debug:
if (!alloc_debug_processing(s, c->page, object, addr))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册