diff options
author | Tetsuo Handa | 2011-07-21 09:42:45 +0900 |
---|---|---|
committer | Pekka Enberg | 2011-07-22 11:01:03 +0300 |
commit | 7ea466f2256b02a7047dfd47d76a2f6c1e427e3e (patch) | |
tree | fbe47a3e126d3f20b0eb4785eaaced80e95b987e | |
parent | b56efcf0a45aa7fc32de90d5f9838541082fbc19 (diff) |
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>
-rw-r--r-- | mm/slab.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/slab.c b/mm/slab.c index c3cb3598555a..dc2f068c0b7d 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -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); } |