diff --git a/mm/slub.c b/mm/slub.c index d26c986b7660..3cc7184af092 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3161,7 +3161,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.