Get rid of the refcount stuff in the allocators and do that part of
kmem_cache management in the common code.
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
*/
BUG_ON(ZERO_OR_NULL_PTR(cachep->slabp_cache));
}
- cachep->refcount = 1;
err = setup_cpu_cache(cachep, gfp);
if (err) {
}
err = __kmem_cache_create(s, flags);
- if (!err)
+ if (!err) {
+ s->refcount = 1;
list_add(&s->list, &slab_caches);
- else {
+ } else {
kfree(s->name);
kmem_cache_free(kmem_cache, s);
}
if (c->align < align)
c->align = align;
- c->refcount = 1;
return 0;
}
else
s->cpu_partial = 30;
- s->refcount = 1;
#ifdef CONFIG_NUMA
s->remote_node_defrag_ratio = 1000;
#endif