aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2008-11-19 07:23:59 -0500
committerPekka Enberg <penberg@cs.helsinki.fi>2008-12-29 04:40:51 -0500
commit89124d706db0aa95daacfa4c0df45a43a44d44f4 (patch)
tree785cc53484e9645c01ad29a18f9c3fff82c6eced /mm/slub.c
parent3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff)
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 <cl@linux-foundation.org> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index a2cd47d89e0a..704cfa34f9ab 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1591,6 +1591,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
1591 unsigned long flags; 1591 unsigned long flags;
1592 unsigned int objsize; 1592 unsigned int objsize;
1593 1593
1594 might_sleep_if(gfpflags & __GFP_WAIT);
1594 local_irq_save(flags); 1595 local_irq_save(flags);
1595 c = get_cpu_slab(s, smp_processor_id()); 1596 c = get_cpu_slab(s, smp_processor_id());
1596 objsize = c->objsize; 1597 objsize = c->objsize;