mm: vmpressure: fix dual calls to global vmpressure

vmpressure function is invoked multiple time from shrink_node,
once for each memcg and then for the entire subtree. But global
vmpressure calculation is performed for each of these calls
resulting in window period ending fast. This is not a problem
when CONFIG_MEMCG is enabled, as global vmpressure is not used
in that case. With !CONFIG_MEMCG global vmpressure is called
twice. Fix this.

Change-Id: I9262790dbe38880e56917b2214c2da59a342ce66
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index 1306f32..e468da6 100644
--- a/mm/vmpressure.c
+++ b/mm/vmpressure.c
@@ -423,7 +423,7 @@
 void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree,
 		unsigned long scanned, unsigned long reclaimed)
 {
-	if (!memcg)
+	if (!memcg && tree)
 		vmpressure_global(gfp, scanned, reclaimed);
 
 	if (IS_ENABLED(CONFIG_MEMCG))