The patch titled Subject: slub: remove useless kmem_cache_debug() before remove_full() has been added to the -mm tree. Its filename is slub-remove-useless-kmem_cache_debug-before-remove_full.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/slub-remove-useless-kmem_cache_debug-before-remove_full.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/slub-remove-useless-kmem_cache_debug-before-remove_full.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Liu Xiang <liu.xiang6@xxxxxxxxxx> Subject: 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@xxxxxxxxxx Signed-off-by: Liu Xiang <liu.xiang6@xxxxxxxxxx> Acked-by: David Rientjes <rientjes@xxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/mm/slub.c~slub-remove-useless-kmem_cache_debug-before-remove_full +++ a/mm/slub.c @@ -2912,8 +2912,7 @@ static void __slab_free(struct kmem_cach * then add it. */ 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); stat(s, FREE_ADD_PARTIAL); } _ Patches currently in -mm which might be from liu.xiang6@xxxxxxxxxx are slub-remove-useless-kmem_cache_debug-before-remove_full.patch