diff --git a/mm/slub.c b/mm/slub.c index 8470c428b51f..1384dc906833 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3100,7 +3100,9 @@ static __always_inline void do_slab_free(struct kmem_cache *s, struct kmem_cache_cpu *c; unsigned long tid; - memcg_slab_free_hook(s, &head, 1); + /* memcg_slab_free_hook() is already called for bulk free. */ + if (!tail) + memcg_slab_free_hook(s, &head, 1); redo: /* * Determine the currently cpus per cpu slab.