aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slob.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slob.c')
-rw-r--r--mm/slob.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/mm/slob.c b/mm/slob.c
index 57bb72ed0d46..79164a4f54ad 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -280,7 +280,6 @@ struct kmem_cache {
280 unsigned long flags; 280 unsigned long flags;
281 const char *name; 281 const char *name;
282 void (*ctor)(void *, struct kmem_cache *, unsigned long); 282 void (*ctor)(void *, struct kmem_cache *, unsigned long);
283 void (*dtor)(void *, struct kmem_cache *, unsigned long);
284}; 283};
285 284
286struct kmem_cache *kmem_cache_create(const char *name, size_t size, 285struct kmem_cache *kmem_cache_create(const char *name, size_t size,
@@ -296,13 +295,11 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
296 c->name = name; 295 c->name = name;
297 c->size = size; 296 c->size = size;
298 if (flags & SLAB_DESTROY_BY_RCU) { 297 if (flags & SLAB_DESTROY_BY_RCU) {
299 BUG_ON(dtor);
300 /* leave room for rcu footer at the end of object */ 298 /* leave room for rcu footer at the end of object */
301 c->size += sizeof(struct slob_rcu); 299 c->size += sizeof(struct slob_rcu);
302 } 300 }
303 c->flags = flags; 301 c->flags = flags;
304 c->ctor = ctor; 302 c->ctor = ctor;
305 c->dtor = dtor;
306 /* ignore alignment unless it's forced */ 303 /* ignore alignment unless it's forced */
307 c->align = (flags & SLAB_HWCACHE_ALIGN) ? SLOB_ALIGN : 0; 304 c->align = (flags & SLAB_HWCACHE_ALIGN) ? SLOB_ALIGN : 0;
308 if (c->align < align) 305 if (c->align < align)
@@ -371,8 +368,6 @@ void kmem_cache_free(struct kmem_cache *c, void *b)
371 slob_rcu->size = c->size; 368 slob_rcu->size = c->size;
372 call_rcu(&slob_rcu->head, kmem_rcu_free); 369 call_rcu(&slob_rcu->head, kmem_rcu_free);
373 } else { 370 } else {
374 if (c->dtor)
375 c->dtor(b, c, 0);
376 __kmem_cache_free(b, c->size); 371 __kmem_cache_free(b, c->size);
377 } 372 }
378} 373}