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

Shakeel Butt
2026-01-12T21:36:27Z

On Wed, Jan 07, 2026 at 08:59:53PM -0800, SeongJae Park wrote:
> On Thu, 25 Dec 2025 15:21:16 -0800 Shakeel Butt <shakeel.butt@linux.dev> wrote:
[...]
> > 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 a lot SJ for the review and suggestions.

Andrew, can you please squash the following fix into the series?

From 7bf26690649ab9c555d17a2acb7215e768232d13 Mon Sep 17 00:00:00 2001
From: Shakeel Butt <shakeel.butt@linux.dev>
Date: Mon, 12 Jan 2026 13:34:27 -0800
Subject: [PATCH] memcg: replace ino with id

Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
---
include/linux/memcontrol.h | 4 ++--
mm/memcontrol.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 538fddd3ef77..b6c82c8f73e1 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -835,7 +835,7 @@ static inline u64 mem_cgroup_id(struct mem_cgroup *memcg)
return memcg ? cgroup_id(memcg->css.cgroup) : 0;
}

-struct mem_cgroup *mem_cgroup_get_from_id(u64 ino);
+struct mem_cgroup *mem_cgroup_get_from_id(u64 id);

static inline struct mem_cgroup *mem_cgroup_from_seq(struct seq_file *m)
{
@@ -1293,7 +1293,7 @@ static inline u64 mem_cgroup_id(struct mem_cgroup *memcg)
return 0;
}

-static inline struct mem_cgroup *mem_cgroup_get_from_id(u64 ino)
+static inline struct mem_cgroup *mem_cgroup_get_from_id(u64 id)
{
return NULL;
}
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index d4ac9b527f91..bd2ab72386d4 100644
--- 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_id(u64 ino)
+struct mem_cgroup *mem_cgroup_get_from_id(u64 id)
{
struct cgroup *cgrp;
struct cgroup_subsys_state *css;
--
2.47.3