From: Christoph Lameter Subject: slub: Use the objsize from the kmem_cache_cpu structure No need to access the kmem_cache structure. Make both checks similar. Signed-off-by: Christoph Lameter --- mm/slub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2008-02-15 23:02:03.000000000 -0800 +++ linux-2.6/mm/slub.c 2008-02-15 23:02:17.000000000 -0800 @@ -1772,7 +1772,7 @@ static __always_inline void slab_free(st void **freelist; c = get_cpu_slab(s, raw_smp_processor_id()); - debug_check_no_locks_freed(object, s->objsize); + debug_check_no_locks_freed(object, c->objsize); do { freelist = c->freelist; barrier(); @@ -1798,8 +1798,8 @@ static __always_inline void slab_free(st unsigned long flags; local_irq_save(flags); - debug_check_no_locks_freed(object, s->objsize); c = get_cpu_slab(s, smp_processor_id()); + debug_check_no_locks_freed(object, c->objsize); if (likely(page == c->page && c->node >= 0)) { object[c->offset] = c->freelist; c->freelist = object;