From: Donghai Qiao <dqiao@redhat.com>
To: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Cc: mhocko@kernel.org, hannes@cmpxchg.org, guro@fb.com, dqiao@redhat.com
Subject: [PATCH] mm/page_counter: remove an incorrect call to propagate_protected_usage()
Date: Thu, 18 Nov 2021 13:11:25 -0500 [thread overview]
Message-ID: <20211118181125.3918222-1-dqiao@redhat.com> (raw)
The function propagate_protected_usage() is called to propagate the usage
change in the page_counter structure. But there is call to this function
from page_counter_try_charge() when there is actually no usage change.
Hence this call should be removed.
Signed-off-by: Donghai Qiao <dqiao@redhat.com>
---
mm/page_counter.c | 1 -
1 file changed, 1 deletion(-)
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
--
2.27.0
next reply other threads:[~2021-11-18 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 18:11 Donghai Qiao [this message]
2021-11-18 19:16 ` Roman Gushchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211118181125.3918222-1-dqiao@redhat.com \
--to=dqiao@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox