mm/vmscan: make too_many_isolated return bool
authorHao Ge <gehao@kylinos.cn>
Mon, 5 Feb 2024 04:26:18 +0000 (12:26 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 18:24:54 +0000 (10:24 -0800)
too_many_isolated() should return bool as does the similar
too_many_isolated() in mm/compaction.c.

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

index 8e52f8795d2028505e3773456bd324a265f11e6d..327bf904fdcdee64d72feb2ec58a464a5237f1dc 100644 (file)
@@ -1744,17 +1744,17 @@ bool folio_isolate_lru(struct folio *folio)
  * the LRU list will go small and be scanned faster than necessary, leading to
  * unnecessary swapping, thrashing and OOM.
  */
-static int too_many_isolated(struct pglist_data *pgdat, int file,
+static bool too_many_isolated(struct pglist_data *pgdat, int file,
                struct scan_control *sc)
 {
        unsigned long inactive, isolated;
        bool too_many;
 
        if (current_is_kswapd())
-               return 0;
+               return false;
 
        if (!writeback_throttling_sane(sc))
-               return 0;
+               return false;
 
        if (file) {
                inactive = node_page_state(pgdat, NR_INACTIVE_FILE);