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>
This commit is contained in:

committed by
Pekka Enberg

parent
8f4c765c22
commit
12c3667fb7
10
mm/slub.c
10
mm/slub.c
@@ -3205,12 +3205,12 @@ static inline int kmem_cache_close(struct kmem_cache *s)
|
||||
|
||||
int __kmem_cache_shutdown(struct kmem_cache *s)
|
||||
{
|
||||
return kmem_cache_close(s);
|
||||
}
|
||||
int rc = kmem_cache_close(s);
|
||||
|
||||
void __kmem_cache_destroy(struct kmem_cache *s)
|
||||
{
|
||||
sysfs_slab_remove(s);
|
||||
if (!rc)
|
||||
sysfs_slab_remove(s);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
|
Reference in New Issue
Block a user