SLUB: after object padding only needed for Redzoning
authorChristoph Lameter <clameter@sgi.com>
Wed, 9 May 2007 09:32:36 +0000 (02:32 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 9 May 2007 19:30:44 +0000 (12:30 -0700)
If no redzoning is selected then we do not need padding before the next
object.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c

index 40e92d8d4bc638e4f8812bea608ed655deab3610..beac34a5e4fdee52a9d1019c40f669103bb6c881 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1661,7 +1661,7 @@ static int calculate_sizes(struct kmem_cache *s)
                 */
                size += 2 * sizeof(struct track);
 
-       if (flags & DEBUG_DEFAULT_FLAGS)
+       if (flags & SLAB_RED_ZONE)
                /*
                 * Add some empty padding so that we can catch
                 * overwrites from earlier objects rather than let