aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2007-05-23 16:57:31 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-23 23:14:11 -0400
commitc12b3c62513ecf95c979d5c1785f99562b9dd10d (patch)
treefd6e14ac0c62a0bc6e00d6543f54beea8abb6e8b /mm/slub.c
parent72fcde966252abd17d70e4e216a0411a34523a8f (diff)
SLUB Debug: Fix object size calculation
The object size calculation is wrong if !CONFIG_SLUB_DEBUG because the #ifdef CONFIG_SLUB_DEBUG is now switching off the size adjustments for DESTROY_BY_RCU and ctor. Signed-off-by: Christoph Lameter <clameter@sgi.com> Acked-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 98801d404d69..0b0c2a3e76f7 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1917,7 +1917,6 @@ static int calculate_sizes(struct kmem_cache *s)
1917 */ 1917 */
1918 s->inuse = size; 1918 s->inuse = size;
1919 1919
1920#ifdef CONFIG_SLUB_DEBUG
1921 if (((flags & (SLAB_DESTROY_BY_RCU | SLAB_POISON)) || 1920 if (((flags & (SLAB_DESTROY_BY_RCU | SLAB_POISON)) ||
1922 s->ctor)) { 1921 s->ctor)) {
1923 /* 1922 /*
@@ -1932,6 +1931,7 @@ static int calculate_sizes(struct kmem_cache *s)
1932 size += sizeof(void *); 1931 size += sizeof(void *);
1933 } 1932 }
1934 1933
1934#ifdef CONFIG_SLUB_DEBUG
1935 if (flags & SLAB_STORE_USER) 1935 if (flags & SLAB_STORE_USER)
1936 /* 1936 /*
1937 * Need to store information about allocs and frees after 1937 * Need to store information about allocs and frees after