mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-28 18:14:23 +00:00
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>
This commit is contained in:
parent
3c92ec8ae9
commit
89124d706d
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue