X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;ds=sidebyside;f=mm%2Fslab_common.c;h=069a24e64403f19bd6f51c9d9a9ef4b56deef48d;hb=79c63eeb805d086f52e5efda9c8d321beeed0b2b;hp=9c217255ac49374834689590f6e2bd9752e23da2;hpb=40924754f2cabd5d9af4bcd4dcecc362b5e0baa1;p=cascardo%2Flinux.git diff --git a/mm/slab_common.c b/mm/slab_common.c index 9c217255ac49..069a24e64403 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -168,6 +168,7 @@ void kmem_cache_destroy(struct kmem_cache *s) list_del(&s->list); if (!__kmem_cache_shutdown(s)) { + mutex_unlock(&slab_mutex); if (s->flags & SLAB_DESTROY_BY_RCU) rcu_barrier(); @@ -175,12 +176,14 @@ void kmem_cache_destroy(struct kmem_cache *s) kmem_cache_free(kmem_cache, s); } else { list_add(&s->list, &slab_caches); + mutex_unlock(&slab_mutex); printk(KERN_ERR "kmem_cache_destroy %s: Slab cache still has objects\n", s->name); dump_stack(); } + } else { + mutex_unlock(&slab_mutex); } - mutex_unlock(&slab_mutex); put_online_cpus(); } EXPORT_SYMBOL(kmem_cache_destroy);