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 <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
This commit is contained in:
Pekka Enberg committed 2009-06-13 23:37:38 +03:00
1 parent 26c02cf05d
commit 95f8598931
1 file changed
+2 -1
+2 -1
View File
@@ -1631,7 +1631,8 @@ new_slab:
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))