{
struct kmem_cache *s = NULL;
- get_online_cpus();
- mutex_lock(&slab_mutex);
-
#ifdef CONFIG_DEBUG_VM
if (!name || in_interrupt() || size < sizeof(void *) ||
size > KMALLOC_MAX_SIZE) {
printk(KERN_ERR "kmem_cache_create(%s) integrity check"
- " failed\n", name);
- goto oops;
+ " failed\n", name);
+ goto out;
}
+#endif
+
+ get_online_cpus();
+ mutex_lock(&slab_mutex);
+#ifdef CONFIG_DEBUG_VM
list_for_each_entry(s, &slab_caches, list) {
char tmp;
int res;
mutex_unlock(&slab_mutex);
put_online_cpus();
+#ifdef CONFIG_DEBUG_VM
+out:
+#endif
if (!s && (flags & SLAB_PANIC))
panic("kmem_cache_create: Failed to create slab '%s'\n", name);