mm/slab: Remove redundant assignments for slab_state
PATCH 1/1 mm/slab: Remove redundant assignments for slab_state
slab_state is being set to "UP" in create_kmalloc_caches(), and later on we set it again in kmem_cache_init_late(), but slab_state does not change in the meantime.
Remove the redundant assignment from kmem_cache_init_late().
And unless I overlooked anything, the same goes for "slab_state = FULL". slab_state is set to "FULL" in kmem_cache_init_late(), but it is later being set again in cpucache_init(), which gets called from do_initcall_level(). So remove the assignment from cpucache_init() as well.
Signed-off-by Oscar Salvador <[email protected]>
--- mm/slab.c | 4 ---- 1 file changed, 4 deletions(-)
mm/slab.c +0 -4
@@ -1317,8 +1317,6 @@ void __init kmem_cache_init_late(void) {struct kmem_cache *cachep; - slab_state =UP ; -/* 6) resize the head arrays to their final sizes */ mutex_lock (&slab_mutex);list_for_each_entry (cachep, &slab_caches, list)
@@ -1354,8 +1352,6 @@ static int __init cpucache_init(void) slab_online_cpu, slab_offline_cpu);WARN_ON (ret <0 ); -/* Done! */ - slab_state =FULL ;return 0 ; }__initcall (cpucache_init);
Signature · 7 lines
1.7.12.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>