summaryrefslogtreecommitdiff
path: root/mm/vmpressure.c
diff options
context:
space:
mode:
authorYang Shi <yang.shi@linux.alibaba.com>2020-04-02 07:10:02 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-02 19:35:31 +0300
commitd8a1c03ff797050b4310bd34b5ef5c0d5c7491e6 (patch)
tree4ac8ad5edffb4788e798dcfc5e5afed3b9544a0d /mm/vmpressure.c
parent565dc842313fde3d0a2e817f96b42bd6a1eb0cad (diff)
downloadlinux-d8a1c03ff797050b4310bd34b5ef5c0d5c7491e6.tar.xz
mm: vmpressure: use mem_cgroup_is_root API
Use mem_cgroup_is_root() API to check if memcg is root memcg instead of open coding. Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: David Rientjes <rientjes@google.com> Link: http://lkml.kernel.org/r/1581398649-125989-2-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmpressure.c')
-rw-r--r--mm/vmpressure.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index 0590f0033448..d69019fc3789 100644
--- a/mm/vmpressure.c
+++ b/mm/vmpressure.c
@@ -280,7 +280,7 @@ void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree,
enum vmpressure_levels level;
/* For now, no users for root-level efficiency */
- if (!memcg || memcg == root_mem_cgroup)
+ if (!memcg || mem_cgroup_is_root(memcg))
return;
spin_lock(&vmpr->sr_lock);