aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2012-09-04 19:38:33 -0400
committerPekka Enberg <penberg@kernel.org>2012-09-05 05:00:36 -0400
commit12c3667fb780e20360ad0bde32dfb3591ef609ad (patch)
treedbced65da22c85212bf632ff6953c0a94252c3ef /mm/slub.c
parent8f4c765c22deee766319ae9a1db68325f14816e6 (diff)
mm/sl[aou]b: Get rid of __kmem_cache_destroy
What is done there can be done in __kmem_cache_shutdown. This affects RCU handling somewhat. On rcu free all slab allocators do not refer to other management structures than the kmem_cache structure. Therefore these other structures can be freed before the rcu deferred free to the page allocator occurs. 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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 6f932f7a8219..e5e09873f5ec 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3205,12 +3205,12 @@ static inline int kmem_cache_close(struct kmem_cache *s)
3205 3205
3206int __kmem_cache_shutdown(struct kmem_cache *s) 3206int __kmem_cache_shutdown(struct kmem_cache *s)
3207{ 3207{
3208 return kmem_cache_close(s); 3208 int rc = kmem_cache_close(s);
3209}
3210 3209
3211void __kmem_cache_destroy(struct kmem_cache *s) 3210 if (!rc)
3212{ 3211 sysfs_slab_remove(s);
3213 sysfs_slab_remove(s); 3212
3213 return rc;
3214} 3214}
3215 3215
3216/******************************************************************** 3216/********************************************************************