Re: [PATCH v3 05/11] mm: memcontrol: constify the mem_cgroup accessors

From: Muchun Song

Date: Tue Sep 15 2026 - 22:33:18 EST




> On Sep 16, 2026, at 07:20, Tal Zussman <tz2294@xxxxxxxxxxxx> wrote:
>
> mem_cgroup_id(), parent_mem_cgroup(), mem_cgroup_is_root(),
> mem_cgroup_is_descendant(), memcg_kmem_id(), and the other memcg
> accessors only read from the memcg. Constify them, along with
> mem_cgroup_shrink_is_root()'s shrink_control.
>
> mem_cgroup_print_oom_context()'s task stays non-const, as
> task_cgroup() takes a non-const task.
>
> Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>

Acked-by: Muchun Song <muchun.song@xxxxxxxxx>

Thanks.