summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2011-02-14 17:54:16 +0200
committerPekka Enberg <penberg@kernel.org>2011-02-14 17:54:16 +0200
commit6ede013ed100e06c0c38e5e111132139bde2f1a7 (patch)
tree574e01614a331ce3f95170b8da6547efdab561f4 /mm
parente4889c4e8ffa567a216c66ccd9da1f5bd91cf595 (diff)
parent3ff84a7f36554b257cd57325b1a7c1fa4b49fbe3 (diff)
Merge branch 'slab/urgent' into for-next
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 4bab2d1a8291..2d5b92c09ae3 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2286,8 +2286,8 @@ kmem_cache_create (const char *name, size_t size, size_t align,
if (ralign < align) {
ralign = align;
}
- /* disable debug if not aligning with REDZONE_ALIGN */
- if (ralign & (__alignof__(unsigned long long) - 1))
+ /* disable debug if necessary */
+ if (ralign > __alignof__(unsigned long long))
flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER);
/*
* 4) Store it.
@@ -2313,8 +2313,8 @@ kmem_cache_create (const char *name, size_t size, size_t align,
*/
if (flags & SLAB_RED_ZONE) {
/* add space for red zone words */
- cachep->obj_offset += align;
- size += align + sizeof(unsigned long long);
+ cachep->obj_offset += sizeof(unsigned long long);
+ size += 2 * sizeof(unsigned long long);
}
if (flags & SLAB_STORE_USER) {
/* user store requires one word storage behind the end of