forked from Minki/linux
slab: fix DEBUG_SLAB warning
In commit c225150b
"slab: fix DEBUG_SLAB build",
"if ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1))" is always true if
ARCH_SLAB_MINALIGN == 0. Do not print warning if ARCH_SLAB_MINALIGN == 0.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
parent
b56efcf0a4
commit
7ea466f225
@ -3155,7 +3155,8 @@ static void *cache_alloc_debugcheck_after(struct kmem_cache *cachep,
|
||||
objp += obj_offset(cachep);
|
||||
if (cachep->ctor && cachep->flags & SLAB_POISON)
|
||||
cachep->ctor(objp);
|
||||
if ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1)) {
|
||||
if (ARCH_SLAB_MINALIGN &&
|
||||
((unsigned long)objp & (ARCH_SLAB_MINALIGN-1))) {
|
||||
printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n",
|
||||
objp, (int)ARCH_SLAB_MINALIGN);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user