Re: [PATCH v1 01/26] mm: memcontrol: remove dead code of checking parent memory cgroup
From: Harry Yoo
Date: Thu Nov 06 2025 - 20:41:06 EST
On Tue, Oct 28, 2025 at 09:58:14PM +0800, Qi Zheng wrote:
> From: Muchun Song <songmuchun@xxxxxxxxxxxxx>
>
> Since the no-hierarchy mode has been deprecated after the commit:
>
> commit bef8620cd8e0 ("mm: memcg: deprecate the non-hierarchical mode").
>
> As a result, parent_mem_cgroup() will not return NULL except when passing
> the root memcg, and the root memcg cannot be offline. Hence, it's safe to
> remove the check on the returned value of parent_mem_cgroup(). Remove the
> corresponding dead code.
>
> Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
> Acked-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>
> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>
> Signed-off-by: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
> ---
Looks good to me,
Reviewed-by: Harry Yoo <harry.yoo@xxxxxxxxxx>
--
Cheers,
Harry / Hyeonggon