]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
slub: Use the objsize from the kmem_cache_cpu structure
authorChristoph Lameter <clameter@sgi.com>
Sat, 16 Feb 2008 07:45:25 +0000 (23:45 -0800)
committerChristoph Lameter <clameter@sgi.com>
Mon, 3 Mar 2008 20:22:31 +0000 (12:22 -0800)
No need to access the kmem_cache structure. We have the same value
in kmem_cache_cpu.

Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
mm/slub.c

index 0a5a1001590ba67b610cc755cfdda08e3cbf6572..b49570ca08b5de961332b466a9d2cfe959a84ecf 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1681,8 +1681,8 @@ static __always_inline void slab_free(struct kmem_cache *s,
        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;