mm/rmap: change the type of we_locked from int to bool
authorHao Ge <gehao@kylinos.cn>
Sun, 28 Apr 2024 01:20:48 +0000 (09:20 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 6 May 2024 00:53:56 +0000 (17:53 -0700)
Change the type of we_locked from int to bool because folio_trylock return
bool

Link: https://lkml.kernel.org/r/20240428012049.8182-1-gehao@kylinos.cn
Signed-off-by: Hao Ge <gehao@kylinos.cn>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/rmap.c

index c912cc1d7b44c1368ee84525c72609450f865ed9..fd021efe02a1285ce249707a8cae60a3f3efe982 100644 (file)
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -964,7 +964,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,