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

SeongJae Park
2026-01-08T05:00:04Z

On Thu, 25 Dec 2025 15:21:16 -0800 Shakeel Butt <shakeel.butt@linux.dev> 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@linux.dev>

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

Reviewed-by: SeongJae Park <sj@kernel.org>

> ---
> 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 …