diff mbox series

mm, slab: remove memcg_from_slab_obj()

Message ID 20240301160808.10623-2-vbabka@suse.cz (mailing list archive)
State New
Headers show
Series mm, slab: remove memcg_from_slab_obj() | expand

Commit Message

Vlastimil Babka March 1, 2024, 4:08 p.m. UTC
This empty wrapped exists only for !CONFIG_MEMCG_KMEM and seems it was
never used. Probably a leftover from development of a series.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
 mm/slub.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Chengming Zhou March 2, 2024, 5:07 a.m. UTC | #1
On 2024/3/2 00:08, Vlastimil Babka wrote:
> This empty wrapped exists only for !CONFIG_MEMCG_KMEM and seems it was
> never used. Probably a leftover from development of a series.
> 
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

LGTM, thanks!

Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev>

> ---
>  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)
>  {
>  }
Roman Gushchin March 2, 2024, 3:57 p.m. UTC | #2
On Fri, Mar 01, 2024 at 05:08:09PM +0100, Vlastimil Babka wrote:
> This empty wrapped exists only for !CONFIG_MEMCG_KMEM and seems it was
> never used. Probably a leftover from development of a series.
> 
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>

Thanks!
David Rientjes March 3, 2024, 10:10 p.m. UTC | #3
On Fri, 1 Mar 2024, Vlastimil Babka wrote:

> This empty wrapped exists only for !CONFIG_MEMCG_KMEM and seems it was
> never used. Probably a leftover from development of a series.
> 
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

Acked-by: David Rientjes <rientjes@google.com>
diff mbox series

Patch

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)
 {
 }