aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/mm/slab.c b/mm/slab.c
index a467b308c682..b8b619bc84ad 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2124,7 +2124,8 @@ static int __init_refok setup_cpu_cache(struct kmem_cache *cachep, gfp_t gfp)
2124int 2124int
2125__kmem_cache_create (struct kmem_cache *cachep, unsigned long flags) 2125__kmem_cache_create (struct kmem_cache *cachep, unsigned long flags)
2126{ 2126{
2127 size_t left_over, freelist_size, ralign; 2127 size_t left_over, freelist_size;
2128 size_t ralign = BYTES_PER_WORD;
2128 gfp_t gfp; 2129 gfp_t gfp;
2129 int err; 2130 int err;
2130 size_t size = cachep->size; 2131 size_t size = cachep->size;
@@ -2157,14 +2158,6 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags)
2157 size &= ~(BYTES_PER_WORD - 1); 2158 size &= ~(BYTES_PER_WORD - 1);
2158 } 2159 }
2159 2160
2160 /*
2161 * Redzoning and user store require word alignment or possibly larger.
2162 * Note this will be overridden by architecture or caller mandated
2163 * alignment if either is greater than BYTES_PER_WORD.
2164 */
2165 if (flags & SLAB_STORE_USER)
2166 ralign = BYTES_PER_WORD;
2167
2168 if (flags & SLAB_RED_ZONE) { 2161 if (flags & SLAB_RED_ZONE) {
2169 ralign = REDZONE_ALIGN; 2162 ralign = REDZONE_ALIGN;
2170 /* If redzoning, ensure that the second redzone is suitably 2163 /* If redzoning, ensure that the second redzone is suitably