Merge tag 'nios2-v5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan...
[linux-2.6-microblaze.git] / mm / memcontrol.c
index 05b4ec2..5beea03 100644 (file)
@@ -2336,6 +2336,9 @@ static unsigned long calculate_high_delay(struct mem_cgroup *memcg,
                usage = page_counter_read(&memcg->memory);
                high = READ_ONCE(memcg->high);
 
+               if (usage <= high)
+                       continue;
+
                /*
                 * Prevent division by 0 in overage calculation by acting as if
                 * it was a threshold of 1 page