[PATCH] mm/rmap: change the type of we_locked from int to bool

From: Hao Ge
Date: Sat Apr 27 2024 - 21:21:44 EST


Change the type of we_locked from int to bool
because folio_trylock return bool

Signed-off-by: Hao Ge <gehao@xxxxxxxxxx>
---
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