Commit acc8f4db authored by Xiongwei Song's avatar Xiongwei Song Committed by Vlastimil Babka

mm/slub: remove the check of !kmem_cache_has_cpu_partial()

The check of !kmem_cache_has_cpu_partial(s) with
CONFIG_SLUB_CPU_PARTIAL enabled here is always false.

We have already checked kmem_cache_debug() earlier and if it was true,
then we either continued or broke from the loop so we can't reach this
code in that case and don't need to check kmem_cache_debug() as part of
kmem_cache_has_cpu_partial() again. Here we can remove it.
Signed-off-by: default avatarXiongwei Song <xiongwei.song@windriver.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 9198ffbd
......@@ -2610,8 +2610,7 @@ static struct slab *get_partial_node(struct kmem_cache *s,
partial_slabs++;
}
#ifdef CONFIG_SLUB_CPU_PARTIAL
if (!kmem_cache_has_cpu_partial(s)
|| partial_slabs > s->cpu_partial_slabs / 2)
if (partial_slabs > s->cpu_partial_slabs / 2)
break;
#else
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment