diff options
author | Miaohe Lin <[email protected]> | 2022-05-12 20:23:00 -0700 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2022-05-13 07:20:14 -0700 |
commit | f19a27e399c4354b91d608dd77f33877f613224a (patch) | |
tree | 5f2c0e090e0282d04e4042fd524abeeeafc662da | |
parent | 4355e4b265ccb55dd6625b82f0e2016f42f2956c (diff) |
mm/vmscan: use helper folio_is_file_lru()
Use helper folio_is_file_lru() to check whether folio is file lru. Minor
readability improvement.
[[email protected]: use folio_is_file_lru()]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Huang, Ying <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Oscar Salvador <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | mm/vmscan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 5c20efe0c82a..9ff3cc2a941a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1414,14 +1414,14 @@ static enum page_references folio_check_references(struct folio *folio, /* * Activate file-backed executable folios after first usage. */ - if ((vm_flags & VM_EXEC) && !folio_test_swapbacked(folio)) + if ((vm_flags & VM_EXEC) && folio_is_file_lru(folio)) return PAGEREF_ACTIVATE; return PAGEREF_KEEP; } /* Reclaim if clean, defer dirty folios to writeback */ - if (referenced_folio && !folio_test_swapbacked(folio)) + if (referenced_folio && folio_is_file_lru(folio)) return PAGEREF_RECLAIM_CLEAN; return PAGEREF_RECLAIM; |