From 3803c98a86e14294c0e8888cb42d7745fdde7c53 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Fri, 15 Feb 2008 23:45:25 -0800 Subject: [PATCH] --- yaml --- r: 86683 b: refs/heads/master c: d8b42bf54be18b5d0bad941b3a1d3e8f022651a7 h: refs/heads/master i: 86681: 1575e8588bb8e78378815a4a5b1d135f24166a3b 86679: 671d16fbbd9ed66b34e8d908d5d0713c06815b52 v: v3 --- [refs] | 2 +- trunk/mm/slub.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 7f3bfcc400aa..d7d9f32d2c2a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ae20bfda6813387af18c7fdbc0f8b1fa7be2d05b +refs/heads/master: d8b42bf54be18b5d0bad941b3a1d3e8f022651a7 diff --git a/trunk/mm/slub.c b/trunk/mm/slub.c index 09b5dc82df58..72f5f4ecd1d2 100644 --- a/trunk/mm/slub.c +++ b/trunk/mm/slub.c @@ -2129,6 +2129,14 @@ static int calculate_sizes(struct kmem_cache *s) unsigned long size = s->objsize; unsigned long align = s->align; + /* + * Round up object size to the next word boundary. We can only + * place the free pointer at word boundaries and this determines + * the possible location of the free pointer. + */ + size = ALIGN(size, sizeof(void *)); + +#ifdef CONFIG_SLUB_DEBUG /* * Determine if we can poison the object itself. If the user of * the slab may touch the object after free or before allocation @@ -2140,14 +2148,7 @@ static int calculate_sizes(struct kmem_cache *s) else s->flags &= ~__OBJECT_POISON; - /* - * Round up object size to the next word boundary. We can only - * place the free pointer at word boundaries and this determines - * the possible location of the free pointer. - */ - size = ALIGN(size, sizeof(void *)); -#ifdef CONFIG_SLUB_DEBUG /* * If we are Redzoning then check if there is some space between the * end of the object and the free pointer. If not then add an