@@ -309,8 +309,6 @@ kmem_cache_create_usercopy(const char *n
const char *cache_name;
int err;
- get_online_cpus();
-
mutex_lock(&slab_mutex);
err = kmem_cache_sanity_check(name, size);
@@ -359,8 +357,6 @@ kmem_cache_create_usercopy(const char *n
out_unlock:
mutex_unlock(&slab_mutex);
- put_online_cpus();
-
if (err) {
if (flags & SLAB_PANIC)
panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n",
@@ -484,8 +480,6 @@ void kmem_cache_destroy(struct kmem_cach
if (unlikely(!s))
return;
- get_online_cpus();
-
mutex_lock(&slab_mutex);
s->refcount--;
@@ -500,8 +494,6 @@ void kmem_cache_destroy(struct kmem_cach
}
out_unlock:
mutex_unlock(&slab_mutex);
-
- put_online_cpus();
}
EXPORT_SYMBOL(kmem_cache_destroy);
@@ -518,12 +510,10 @@ int kmem_cache_shrink(struct kmem_cache
{
int ret;
- get_online_cpus();
kasan_cache_shrink(cachep);
ret = __kmem_cache_shrink(cachep);
- put_online_cpus();
return ret;
}
EXPORT_SYMBOL(kmem_cache_shrink);