summaryrefslogtreecommitdiff
path: root/mm/slob.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2012-09-04 23:18:33 +0000
committerPekka Enberg <penberg@kernel.org>2012-09-05 12:00:37 +0300
commit8a13a4cc80bb25c9eab2e7e56bab724fcfa55fce (patch)
treea212edb3d0b139b0743ca5ca34c14037a6ada4dc /mm/slob.c
parent278b1bb1313664d4999a7f7d47a8a8d964862d02 (diff)
mm/sl[aou]b: Shrink __kmem_cache_create() parameter lists
Do the initial settings of the fields in common code. This will allow us to push more processing into common code later and improve readability. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slob.c')
-rw-r--r--mm/slob.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/slob.c b/mm/slob.c
index 9b0cee1e8475..cac05d92f329 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -508,17 +508,15 @@ size_t ksize(const void *block)
}
EXPORT_SYMBOL(ksize);
-int __kmem_cache_create(struct kmem_cache *c, const char *name, size_t size,
- size_t align, unsigned long flags, void (*ctor)(void *))
+int __kmem_cache_create(struct kmem_cache *c, unsigned long flags)
{
- c->name = name;
- c->size = size;
+ size_t align = c->size;
+
if (flags & SLAB_DESTROY_BY_RCU) {
/* leave room for rcu footer at the end of object */
c->size += sizeof(struct slob_rcu);
}
c->flags = flags;
- c->ctor = ctor;
/* ignore alignment unless it's forced */
c->align = (flags & SLAB_HWCACHE_ALIGN) ? SLOB_ALIGN : 0;
if (c->align < ARCH_SLAB_MINALIGN)