|
@@ -2169,7 +2169,6 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags)
|
|
|
else
|
|
|
size += BYTES_PER_WORD;
|
|
|
}
|
|
|
-#if FORCED_DEBUG && defined(CONFIG_DEBUG_PAGEALLOC)
|
|
|
/*
|
|
|
* To activate debug pagealloc, off-slab management is necessary
|
|
|
* requirement. In early phase of initialization, small sized slab
|
|
@@ -2177,14 +2176,13 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags)
|
|
|
* to check size >= 256. It guarantees that all necessary small
|
|
|
* sized slab is initialized in current slab initialization sequence.
|
|
|
*/
|
|
|
- if (debug_pagealloc_enabled() &&
|
|
|
+ if (debug_pagealloc_enabled() && (flags & SLAB_POISON) &&
|
|
|
!slab_early_init && size >= kmalloc_size(INDEX_NODE) &&
|
|
|
size >= 256 && cachep->object_size > cache_line_size() &&
|
|
|
ALIGN(size, cachep->align) < PAGE_SIZE) {
|
|
|
cachep->obj_offset += PAGE_SIZE - ALIGN(size, cachep->align);
|
|
|
size = PAGE_SIZE;
|
|
|
}
|
|
|
-#endif
|
|
|
#endif
|
|
|
|
|
|
/*
|