--- include/linux/slub_def.h | 2 -- mm/slub.c | 15 ++------------- 2 files changed, 2 insertions(+), 15 deletions(-) Index: linux-2.6/include/linux/slub_def.h =================================================================== --- linux-2.6.orig/include/linux/slub_def.h 2007-10-30 15:52:12.000000000 -0700 +++ linux-2.6/include/linux/slub_def.h 2007-10-30 16:00:01.000000000 -0700 @@ -16,8 +16,6 @@ struct kmem_cache_cpu { struct page *page; int node; unsigned int offset; - unsigned int objsize; - unsigned int objects; }; struct kmem_cache_node { Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2007-10-30 15:52:36.000000000 -0700 +++ linux-2.6/mm/slub.c 2007-10-30 16:00:08.000000000 -0700 @@ -1607,7 +1607,7 @@ load_freelist: object = c->page->freelist; c->freelist = object[c->offset]; - c->page->inuse = c->objects; + c->page->inuse = s->objects; c->page->freelist = c->page->end; c->node = page_to_nid(c->page); unlock_out: @@ -1691,7 +1691,7 @@ static void __always_inline *slab_alloc( #endif if (unlikely((gfpflags & __GFP_ZERO))) - memset(object, 0, c->objsize); + memset(object, 0, s->objsize); out: return object; } @@ -2016,8 +2016,6 @@ static void init_kmem_cache_cpu(struct k c->freelist = (void *)PAGE_MAPPING_ANON; c->node = 0; c->offset = s->offset / sizeof(void *); - c->objsize = s->objsize; - c->objects = s->objects; } static void init_kmem_cache_node(struct kmem_cache_node *n) @@ -3026,21 +3024,12 @@ struct kmem_cache *kmem_cache_create(con down_write(&slub_lock); s = find_mergeable(size, align, flags, name, ctor); if (s) { - int cpu; - s->refcount++; /* * Adjust the object sizes so that we clear * the complete object on kzalloc. */ s->objsize = max(s->objsize, (int)size); - - /* - * And then we need to update the object size in the - * per cpu structures - */ - for_each_online_cpu(cpu) - get_cpu_slab(s, cpu)->objsize = s->objsize; s->inuse = max_t(int, s->inuse, ALIGN(size, sizeof(void *))); up_write(&slub_lock); if (sysfs_slab_alias(s, name))