Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;