From 17cce771c5fc85f43680143ac8b3b944fdad113f Mon Sep 17 00:00:00 2001 From: Vlastimil Babka Date: Fri, 1 Mar 2024 17:08:09 +0100 Subject: [PATCH] mm, slab: remove memcg_from_slab_obj() This empty wrapped exists only for !CONFIG_MEMCG_KMEM and seems it was never used. Probably a leftover from development of a series. Reviewed-by: Chengming Zhou Reviewed-by: Roman Gushchin Acked-by: David Rientjes Signed-off-by: Vlastimil Babka --- mm/slub.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 12066e69688d..186a8ec28228 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2028,11 +2028,6 @@ void memcg_slab_alloc_error_hook(struct kmem_cache *s, int objects, obj_cgroup_uncharge(objcg, objects * obj_full_size(s)); } #else /* CONFIG_MEMCG_KMEM */ -static inline struct mem_cgroup *memcg_from_slab_obj(void *ptr) -{ - return NULL; -} - static inline void memcg_free_slab_cgroups(struct slab *slab) { }