summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2011-03-11 18:11:19 +0200
committerPekka Enberg <penberg@kernel.org>2011-03-11 18:11:19 +0200
commit865d794d1f144d0f93796840d01696cd70647a8a (patch)
treeaab3956dabf6b8f95af4a3fd689b7ed24868e19e
parentc9149556756d56c68451a4a8735c37e7062fd3d7 (diff)
parent3ff84a7f36554b257cd57325b1a7c1fa4b49fbe3 (diff)
downloadop-kernel-dev-865d794d1f144d0f93796840d01696cd70647a8a.zip
op-kernel-dev-865d794d1f144d0f93796840d01696cd70647a8a.tar.gz
Merge branch 'slab/urgent' into slab/next
-rw-r--r--mm/slab.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 7d92f08..a18ba57 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2289,8 +2289,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.
@@ -2316,8 +2316,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
OpenPOWER on IntegriCloud