diff options
author | Pekka Enberg <penberg@kernel.org> | 2011-03-11 11:11:19 -0500 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2011-03-11 11:11:19 -0500 |
commit | 865d794d1f144d0f93796840d01696cd70647a8a (patch) | |
tree | aab3956dabf6b8f95af4a3fd689b7ed24868e19e /mm/slab.c | |
parent | c9149556756d56c68451a4a8735c37e7062fd3d7 (diff) | |
parent | 3ff84a7f36554b257cd57325b1a7c1fa4b49fbe3 (diff) |
Merge branch 'slab/urgent' into slab/next
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2289,8 +2289,8 @@ kmem_cache_create (const char *name, size_t size, size_t align, | |||
2289 | if (ralign < align) { | 2289 | if (ralign < align) { |
2290 | ralign = align; | 2290 | ralign = align; |
2291 | } | 2291 | } |
2292 | /* disable debug if not aligning with REDZONE_ALIGN */ | 2292 | /* disable debug if necessary */ |
2293 | if (ralign & (__alignof__(unsigned long long) - 1)) | 2293 | if (ralign > __alignof__(unsigned long long)) |
2294 | flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER); | 2294 | flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER); |
2295 | /* | 2295 | /* |
2296 | * 4) Store it. | 2296 | * 4) Store it. |
@@ -2316,8 +2316,8 @@ kmem_cache_create (const char *name, size_t size, size_t align, | |||
2316 | */ | 2316 | */ |
2317 | if (flags & SLAB_RED_ZONE) { | 2317 | if (flags & SLAB_RED_ZONE) { |
2318 | /* add space for red zone words */ | 2318 | /* add space for red zone words */ |
2319 | cachep->obj_offset += align; | 2319 | cachep->obj_offset += sizeof(unsigned long long); |
2320 | size += align + sizeof(unsigned long long); | 2320 | size += 2 * sizeof(unsigned long long); |
2321 | } | 2321 | } |
2322 | if (flags & SLAB_STORE_USER) { | 2322 | if (flags & SLAB_STORE_USER) { |
2323 | /* user store requires one word storage behind the end of | 2323 | /* user store requires one word storage behind the end of |