From: Hao Ge <gehao@kylinos.cn>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
gehao618@163.com, Hao Ge <gehao@kylinos.cn>
Subject: [PATCH] mm/rmap: change the type of we_locked from int to bool
Date: Sun, 28 Apr 2024 09:20:48 +0800 [thread overview]
Message-ID: <20240428012049.8182-1-gehao@kylinos.cn> (raw)
Change the type of we_locked from int to bool
because folio_trylock return bool
Signed-off-by: Hao Ge <gehao@kylinos.cn>
---
mm/rmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index 3746a5531018..3da95b911cc0 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -961,7 +961,7 @@ static bool invalid_folio_referenced_vma(struct vm_area_struct *vma, void *arg)
int folio_referenced(struct folio *folio, int is_locked,
struct mem_cgroup *memcg, unsigned long *vm_flags)
{
- int we_locked = 0;
+ bool we_locked = false;
struct folio_referenced_arg pra = {
.mapcount = folio_mapcount(folio),
.memcg = memcg,
--
2.25.1
reply other threads:[~2024-04-28 1:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240428012049.8182-1-gehao@kylinos.cn \
--to=gehao@kylinos.cn \
--cc=akpm@linux-foundation.org \
--cc=gehao618@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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