summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2012-09-05 01:38:33 +0200
committerPekka Enberg <penberg@kernel.org>2012-09-05 11:00:35 +0200
commit7c9adf5a5471647f392169ef19d3e81dcfa76045 (patch)
tree4e32d1875e45eafd4c4c9f2caedcf3419479c0b8 /mm/slub.c
parentmm/slab_common: Improve error handling in kmem_cache_create (diff)
downloadlinux-7c9adf5a5471647f392169ef19d3e81dcfa76045.tar.xz
linux-7c9adf5a5471647f392169ef19d3e81dcfa76045.zip
mm/sl[aou]b: Move list_add() to slab_common.c
Move the code to append the new kmem_cache to the list of slab caches to the kmem_cache_create code in the shared code. This is possible now since the acquisition of the mutex was moved into kmem_cache_create(). Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: Glauber Costa <glommer@parallels.com> Reviewed-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c
index c66908983218..24aa362edef7 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3975,7 +3975,6 @@ struct kmem_cache *__kmem_cache_create(const char *name, size_t size,
size, align, flags, ctor)) {
int r;
- list_add(&s->list, &slab_caches);
mutex_unlock(&slab_mutex);
r = sysfs_slab_add(s);
mutex_lock(&slab_mutex);
@@ -3983,7 +3982,6 @@ struct kmem_cache *__kmem_cache_create(const char *name, size_t size,
if (!r)
return s;
- list_del(&s->list);
kmem_cache_close(s);
}
kmem_cache_free(kmem_cache, s);