aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonghai Qiao <[email protected]>2022-01-14 14:05:32 -0800
committerLinus Torvalds <[email protected]>2022-01-15 16:30:27 +0200
commit46a53371f3fd9bf873fdd9c4df75b1cd86df1098 (patch)
treeb09577a328ca8d4c1563dde98bc71a9018cbd453
parent17c17367758059930246dde937cc7da9b8f3549e (diff)
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/[email protected] Signed-off-by: Donghai Qiao <[email protected]> Reviewed-by: Roman Gushchin <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Johannes Weiner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/page_counter.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/mm/page_counter.c b/mm/page_counter.c
index 7d83641eb86b..eb156ff5d603 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