lkml.org 
[lkml]   [2024]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm/rmap: change the type of we_locked from int to bool
Date
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

\
 
 \ /
  Last update: 2024-04-28 03:21    [W:0.036 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site