We should use time_before() instead of time_after(), since we want true value to repeat the loop before timeout reaches.
https://jira.sw.ru/browse/PSBM-96889 Signed-off-by: Andrey Ryabinin <[email protected]> --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 884f1596bb24..7a0b8815bd00 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4377,7 +4377,7 @@ static void mem_cgroup_reparent_charges(struct mem_cgroup *memcg) * charge before adding to the LRU. */ } while ((page_counter_read(&memcg->memory) - - page_counter_read(&memcg->kmem) > 0) && time_after(jiffies, timeout)); + page_counter_read(&memcg->kmem) > 0) && time_before(jiffies, timeout)); WARN_ONCE((page_counter_read(&memcg->memory) - page_counter_read(&memcg->kmem) > 0), -- 2.21.0 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
