|
@@ -2752,13 +2752,6 @@ static int cache_grow(struct kmem_cache *cachep,
|
|
|
|
|
|
ctor_flags = SLAB_CTOR_CONSTRUCTOR;
|
|
|
local_flags = (flags & GFP_LEVEL_MASK);
|
|
|
- if (!(local_flags & __GFP_WAIT))
|
|
|
- /*
|
|
|
- * Not allowed to sleep. Need to tell a constructor about
|
|
|
- * this - it might need to know...
|
|
|
- */
|
|
|
- ctor_flags |= SLAB_CTOR_ATOMIC;
|
|
|
-
|
|
|
/* Take the l3 list lock to change the colour_next on this node */
|
|
|
check_irq_off();
|
|
|
l3 = cachep->nodelists[nodeid];
|
|
@@ -3092,14 +3085,8 @@ static void *cache_alloc_debugcheck_after(struct kmem_cache *cachep,
|
|
|
}
|
|
|
#endif
|
|
|
objp += obj_offset(cachep);
|
|
|
- if (cachep->ctor && cachep->flags & SLAB_POISON) {
|
|
|
- unsigned long ctor_flags = SLAB_CTOR_CONSTRUCTOR;
|
|
|
-
|
|
|
- if (!(flags & __GFP_WAIT))
|
|
|
- ctor_flags |= SLAB_CTOR_ATOMIC;
|
|
|
-
|
|
|
- cachep->ctor(objp, cachep, ctor_flags);
|
|
|
- }
|
|
|
+ if (cachep->ctor && cachep->flags & SLAB_POISON)
|
|
|
+ cachep->ctor(objp, cachep, SLAB_CTOR_CONSTRUCTOR);
|
|
|
#if ARCH_SLAB_MINALIGN
|
|
|
if ((u32)objp & (ARCH_SLAB_MINALIGN-1)) {
|
|
|
printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n",
|