]> Git Repo - J-linux.git/commitdiff
SLUB: Don't print out OOM warning for __GFP_NOFAIL
authorPekka Enberg <[email protected]>
Thu, 11 Jun 2009 13:18:09 +0000 (16:18 +0300)
committerPekka Enberg <[email protected]>
Sat, 13 Jun 2009 20:37:38 +0000 (23:37 +0300)
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]>
mm/slub.c

index 9fb892b6afe30c4754d25274c9b5866da127c7c7..0996b3be751a8c79b2c71b529e1bfe892417ef96 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -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))
This page took 0.052885 seconds and 4 git commands to generate.