Skip to content

Commit

Permalink
slub: Add might_sleep_if() to slab_alloc()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
OGAWA Hirofumi authored and Pekka Enberg committed Dec 29, 2008
1 parent 3c92ec8 commit 89124d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 89124d7

Please sign in to comment.