Re: [PATCH 8/8] memcg: rename mem_cgroup_ino() to mem_cgroup_id()

From: SeongJae Park

Date: Thu Jan 08 2026 - 00:00:11 EST


On Thu, 25 Dec 2025 15:21:16 -0800 Shakeel Butt <shakeel.butt@xxxxxxxxx> wrote:

> Rename mem_cgroup_ino() to mem_cgroup_id() and mem_cgroup_get_from_ino()
> to mem_cgroup_get_from_id(). These functions now use cgroup IDs (from
> cgroup_id()) rather than inode numbers, so the names should reflect that.
>
> Signed-off-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>

I left trivial comments below. Because those are only trivial,

Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>

> ---
> include/linux/memcontrol.h | 8 ++++----
> mm/damon/core.c | 2 +-
> mm/damon/ops-common.c | 2 +-
> mm/damon/sysfs-schemes.c | 2 +-
> mm/memcontrol.c | 2 +-
> mm/shrinker_debug.c | 10 +++++-----
> mm/vmscan.c | 6 +++---
> 7 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> index 3e7d69020b39..5a1161cadb8d 100644
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
[...]
> -struct mem_cgroup *mem_cgroup_get_from_ino(u64 ino);
> +struct mem_cgroup *mem_cgroup_get_from_id(u64 ino);

Nit. How about renaming the argument from 'ino' to 'id'?

[...]
> -static inline struct mem_cgroup *mem_cgroup_get_from_ino(u64 ino)
> +static inline struct mem_cgroup *mem_cgroup_get_from_id(u64 ino)

Ditto.

[...]
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -3615,7 +3615,7 @@ struct mem_cgroup *mem_cgroup_from_private_id(unsigned short id)
> return xa_load(&mem_cgroup_private_ids, id);
> }
>
> -struct mem_cgroup *mem_cgroup_get_from_ino(u64 ino)
> +struct mem_cgroup *mem_cgroup_get_from_id(u64 ino)

Ditto.


Thanks,
SJ

[...]