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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use helper folio_is_file_lru() to check whether folio is file lru.  Minor
readability improvement.

Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>
---
Hi Andrew,
Please feel free to squash this into below patch:
https://lore.kernel.org/all/20220425111232.23182-7-linmiaohe@xxxxxxxxxx/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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux