summaryrefslogtreecommitdiff
path: root/mm/vmpressure.c
diff options
context:
space:
mode:
authorHui Su <suhui@zeku.com>2021-09-03 00:59:36 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-09-03 19:58:17 +0300
commit9647875be52b33fe22cb034ec3074896c581543f (patch)
treecda5239fcb015827c95d6108763a399d388ad65b /mm/vmpressure.c
parent20b51af15e014cac63b58a4f8b8b323ac35bccce (diff)
downloadlinux-9647875be52b33fe22cb034ec3074896c581543f.tar.xz
mm/vmpressure: replace vmpressure_to_css() with vmpressure_to_memcg()
We can get memcg directly form vmpr instead of vmpr->memcg->css->memcg, so add a new func helper vmpressure_to_memcg(). And no code will use vmpressure_to_css(), so delete it. Link: https://lkml.kernel.org/r/20210630112146.455103-1-suhui@zeku.com Signed-off-by: Hui Su <suhui@zeku.com> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Chris Down <chris@chrisdown.name> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Vladimir Davydov <vdavydov.dev@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmpressure.c')
-rw-r--r--mm/vmpressure.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index 9b172561fded..76518e4166dc 100644
--- a/mm/vmpressure.c
+++ b/mm/vmpressure.c
@@ -74,8 +74,7 @@ static struct vmpressure *work_to_vmpressure(struct work_struct *work)
static struct vmpressure *vmpressure_parent(struct vmpressure *vmpr)
{
- struct cgroup_subsys_state *css = vmpressure_to_css(vmpr);
- struct mem_cgroup *memcg = mem_cgroup_from_css(css);
+ struct mem_cgroup *memcg = vmpressure_to_memcg(vmpr);
memcg = parent_mem_cgroup(memcg);
if (!memcg)