All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/rmap: change the type of we_locked from int to bool
@ 2024-04-28  1:20 Hao Ge
  0 siblings, 0 replies; only message in thread
From: Hao Ge @ 2024-04-28  1:20 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, gehao618, Hao Ge

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-28  1:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28  1:20 [PATCH] mm/rmap: change the type of we_locked from int to bool Hao Ge

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.