|
@@ -346,15 +346,15 @@ void kmem_cache_destroy(struct kmem_cache *s)
|
|
if (memcg_cleanup_cache_params(s) != 0)
|
|
if (memcg_cleanup_cache_params(s) != 0)
|
|
goto out_unlock;
|
|
goto out_unlock;
|
|
|
|
|
|
- list_del(&s->list);
|
|
|
|
if (__kmem_cache_shutdown(s) != 0) {
|
|
if (__kmem_cache_shutdown(s) != 0) {
|
|
- list_add(&s->list, &slab_caches);
|
|
|
|
printk(KERN_ERR "kmem_cache_destroy %s: "
|
|
printk(KERN_ERR "kmem_cache_destroy %s: "
|
|
"Slab cache still has objects\n", s->name);
|
|
"Slab cache still has objects\n", s->name);
|
|
dump_stack();
|
|
dump_stack();
|
|
goto out_unlock;
|
|
goto out_unlock;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ list_del(&s->list);
|
|
|
|
+
|
|
mutex_unlock(&slab_mutex);
|
|
mutex_unlock(&slab_mutex);
|
|
if (s->flags & SLAB_DESTROY_BY_RCU)
|
|
if (s->flags & SLAB_DESTROY_BY_RCU)
|
|
rcu_barrier();
|
|
rcu_barrier();
|