diff options
author | Oscar Salvador <osalvador@techadventures.net> | 2018-01-31 16:15:39 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-31 17:18:35 -0800 |
commit | 84ebb5827d015c1045429d018bf9a48f95f082a6 (patch) | |
tree | b9aaaf0e7b135f7b406dcd35f66f2503a841b54d /mm/slab.c | |
parent | 692ae74aaf226a557d88d5412a1764c09e63a193 (diff) | |
download | linux-stable-84ebb5827d015c1045429d018bf9a48f95f082a6.tar.gz linux-stable-84ebb5827d015c1045429d018bf9a48f95f082a6.tar.bz2 linux-stable-84ebb5827d015c1045429d018bf9a48f95f082a6.zip |
mm/slab.c: 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.
Link: http://lkml.kernel.org/r/20171215134452.GA1920@techadventures.net
Signed-off-by: Oscar Salvador <osalvador@techadventures.net>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/mm/slab.c b/mm/slab.c index 4e51ef954026..226906294183 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1316,8 +1316,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) @@ -1353,8 +1351,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); |