Merge branch 'akpm' (patches from Andrew)
[linux-2.6-microblaze.git] / mm / slab_common.c
index 1c673c3..ec2bb0b 100644 (file)
@@ -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);