diff --git a/mm/vmpressure.c b/mm/vmpressure.c index 506f03e4be47a13f6dc2240b7497d506ce3f8eee..9a6c0704211c856c300f67057fc202e25c9657ab 100644 --- a/mm/vmpressure.c +++ b/mm/vmpressure.c @@ -260,7 +260,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 == root_mem_cgroup) + if (!memcg || memcg == root_mem_cgroup) return; spin_lock(&vmpr->sr_lock);