Re: [PATCH RFC 01/28] mm: memcontrol: remove dead code of checking parent memory cgroup
From: Johannes Weiner
Date: Thu Apr 17 2025 - 10:35:23 EST
On Tue, Apr 15, 2025 at 10:45:05AM +0800, Muchun Song wrote:
> 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>