X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=mm%2Fslab_common.c;h=ec2bb0beed757cf2b143920b07b43fafeb9169f5;hb=0f4b9289bad354b606190a4cd54d5222b4e41d98;hp=1c673c323baf2eed3fbf57d22d9ad70c779b5dd3;hpb=71af75b6929458d85f63c0649dc26d6f4c19729e;p=linux-2.6-microblaze.git diff --git a/mm/slab_common.c b/mm/slab_common.c index 1c673c323baf..ec2bb0beed75 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -502,6 +502,7 @@ void kmem_cache_destroy(struct kmem_cache *s) if (unlikely(!s)) return; + cpus_read_lock(); mutex_lock(&slab_mutex); s->refcount--; @@ -516,6 +517,7 @@ void kmem_cache_destroy(struct kmem_cache *s) } out_unlock: mutex_unlock(&slab_mutex); + cpus_read_unlock(); } EXPORT_SYMBOL(kmem_cache_destroy);