[PATCH] mm/vmscan: use helper folio_is_file_lru()

Miaohe Lin posted 1 patch 4 years ago
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] mm/vmscan: use helper folio_is_file_lru()
Posted by Miaohe Lin 4 years ago
Use helper folio_is_file_lru() to check whether folio is file lru.  Minor
readability improvement.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
Hi Andrew,
Please feel free to squash this into below patch:
https://lore.kernel.org/all/20220425111232.23182-7-linmiaohe@huawei.com/T/#u
Thanks!
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index ecd74858b8d7..9ff3cc2a941a 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1414,7 +1414,7 @@ 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;
-- 
2.23.0