slub: change kmem_cache->align to record the real alignment
authorZhang, Yanmin <yanmin_zhang@linux.intel.com>
Thu, 30 Jul 2009 03:28:11 +0000 (11:28 +0800)
committerPekka Enberg <penberg@cs.helsinki.fi>
Sat, 1 Aug 2009 15:26:40 +0000 (18:26 +0300)
kmem_cache->align records the original align parameter value specified
by users. Function calculate_alignment might change it based on cache
line size. So change kmem_cache->align correspondingly.

Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
mm/slub.c

index a465c0a..801fe4b 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2422,6 +2422,7 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)
         * on bootup.
         */
        align = calculate_alignment(flags, align, s->objsize);
+       s->align = align;
 
        /*
         * SLUB stores one object immediately after another beginning from