From: OGAWA Hirofumi Date: Wed, 19 Nov 2008 12:23:59 +0000 (+0900) Subject: slub: Add might_sleep_if() to slab_alloc() X-Git-Tag: v2.6.29-rc1~565^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=89124d706db0aa95daacfa4c0df45a43a44d44f4;p=linux-2.6-omap-h63xx.git slub: Add might_sleep_if() to slab_alloc() Currently SLUB doesn't warn about __GFP_WAIT. Add it into slab_alloc(). Acked-by: Christoph Lameter Signed-off-by: OGAWA Hirofumi Signed-off-by: Pekka Enberg --- diff --git a/mm/slub.c b/mm/slub.c index a2cd47d89e0..704cfa34f9a 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -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;