Commit 89124d70 authored by OGAWA Hirofumi's avatar OGAWA Hirofumi Committed by Pekka Enberg

slub: Add might_sleep_if() to slab_alloc()

Currently SLUB doesn't warn about __GFP_WAIT. Add it into slab_alloc().
Acked-by: default avatarChristoph Lameter <cl@linux-foundation.org>
Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent 3c92ec8a
......@@ -1591,6 +1591,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
unsigned long flags;
unsigned int objsize;
might_sleep_if(gfpflags & __GFP_WAIT);
local_irq_save(flags);
c = get_cpu_slab(s, smp_processor_id());
objsize = c->objsize;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment