From d6ae8bc7c420522b03db7116e3525b10b0071dfc Mon Sep 17 00:00:00 2001 From: Donghai Qiao Date: Fri, 14 Jan 2022 14:05:32 -0800 Subject: [PATCH] mm/page_counter: remove an incorrect call to propagate_protected_usage() propagate_protected_usage() is called to propagate the usage change in the page_counter structure. But there is a call to this function from page_counter_try_charge() when there is actually no usage change. Hence this call should be removed. Link: https://lkml.kernel.org/r/20211118181125.3918222-1-dqiao@redhat.com Signed-off-by: Donghai Qiao Reviewed-by: Roman Gushchin Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/page_counter.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/page_counter.c b/mm/page_counter.c index 7d83641eb86b7..eb156ff5d6030 100644 --- a/mm/page_counter.c +++ b/mm/page_counter.c @@ -120,7 +120,6 @@ bool page_counter_try_charge(struct page_counter *counter, new = atomic_long_add_return(nr_pages, &c->usage); if (new > c->max) { atomic_long_sub(nr_pages, &c->usage); - propagate_protected_usage(c, new); /* * This is racy, but we can live with some * inaccuracy in the failcnt which is only used -- 2.39.5