Commit a4d3f891 authored by Liu Xiang's avatar Liu Xiang Committed by Linus Torvalds

slub: remove useless kmem_cache_debug() before remove_full()

When CONFIG_SLUB_DEBUG is not enabled, remove_full() is empty.
While CONFIG_SLUB_DEBUG is enabled, remove_full() can check
s->flags by itself. So kmem_cache_debug() is useless and
can be removed.

Link: http://lkml.kernel.org/r/1552577313-2830-1-git-send-email-liu.xiang6@zte.com.cnSigned-off-by: default avatarLiu Xiang <liu.xiang6@zte.com.cn>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3e05617c
...@@ -2903,7 +2903,6 @@ static void __slab_free(struct kmem_cache *s, struct page *page, ...@@ -2903,7 +2903,6 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
* then add it. * then add it.
*/ */
if (!kmem_cache_has_cpu_partial(s) && unlikely(!prior)) { if (!kmem_cache_has_cpu_partial(s) && unlikely(!prior)) {
if (kmem_cache_debug(s))
remove_full(s, n, page); remove_full(s, n, page);
add_partial(n, page, DEACTIVATE_TO_TAIL); add_partial(n, page, DEACTIVATE_TO_TAIL);
stat(s, FREE_ADD_PARTIAL); stat(s, FREE_ADD_PARTIAL);
......
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