Commit b47f77b5 authored by Li Zefan's avatar Li Zefan Committed by Tejun Heo

memcg: convert to use cgroup_is_descendant()

This is a preparation to kill css_id.
Signed-off-by: default avatarLi Zefan <lizefan@huawei.com>
Acked-by: default avatarMichal Hocko <mhocko@suse.cz>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 272b98c6
...@@ -1318,7 +1318,7 @@ bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, ...@@ -1318,7 +1318,7 @@ bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg,
return true; return true;
if (!root_memcg->use_hierarchy || !memcg) if (!root_memcg->use_hierarchy || !memcg)
return false; return false;
return css_is_ancestor(&memcg->css, &root_memcg->css); return cgroup_is_descendant(memcg->css.cgroup, root_memcg->css.cgroup);
} }
static bool mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, static bool mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment