There are three places, vmpressure_prio(), shrink_node_memcgs() and shrink_node(), which invoke vmpressure(). But only shrink_node_memcgs() sets tree to false and the memcg used in it is not NULL, so we don't check it again in vmpressure(). Signed-off-by: Haifeng Xu <haifeng.xu@xxxxxxxxxx> --- mm/vmpressure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmpressure.c b/mm/vmpressure.c index b52644771cc4..3e4251a55e56 100644 --- a/mm/vmpressure.c +++ b/mm/vmpressure.c @@ -284,7 +284,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 || mem_cgroup_is_root(memcg)) + if (mem_cgroup_is_root(memcg)) return; spin_lock(&vmpr->sr_lock); -- 2.25.1