From: Zhang, Yanmin Date: Thu, 30 Jul 2009 03:28:11 +0000 (+0800) Subject: slub: change kmem_cache->align to record the real alignment X-Git-Tag: firefly_0821_release~12975^2^3~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dcb0ce1bdf39581bcd0cffc3d487fb20667977cd;p=firefly-linux-kernel-4.4.55.git slub: change kmem_cache->align to record the real alignment 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 Signed-off-by: Pekka Enberg --- diff --git a/mm/slub.c b/mm/slub.c index a465c0a09fb5..801fe4b9b68d 100644 --- 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