mm/memcg: non-hierarchical mode is deprecated
After commit bef8620cd8
("mm: memcg: deprecate the non-hierarchical
mode"), we won't have a NULL parent except root_mem_cgroup. And this case
is handled when (memcg == root).
Link: https://lkml.kernel.org/r/20220403020833.26164-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
@@ -6587,9 +6587,6 @@ void mem_cgroup_calculate_protection(struct mem_cgroup *root,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
parent = parent_mem_cgroup(memcg);
|
parent = parent_mem_cgroup(memcg);
|
||||||
/* No parent means a non-hierarchical mode on v1 memcg */
|
|
||||||
if (!parent)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (parent == root) {
|
if (parent == root) {
|
||||||
memcg->memory.emin = READ_ONCE(memcg->memory.min);
|
memcg->memory.emin = READ_ONCE(memcg->memory.min);
|
||||||
|
Reference in New Issue
Block a user