summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2009-06-11 16:18:09 +0300
committerPekka Enberg <penberg@cs.helsinki.fi>2009-06-13 23:37:38 +0300
commit95f8598931bd86a5775073db2fa2004b892dd3d0 (patch)
treec315a6fb15b626c31c139519e099fec43a1bec2b
parent26c02cf05ddadfee3952e829b841583794bf46f6 (diff)
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: Pekka Enberg <penberg@cs.helsinki.fi>
-rw-r--r--mm/slub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 9fb892b6afe3..0996b3be751a 100644
--- 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))