Skip to contentSkip to conversation

mm/vmscan: use helper folio_is_file_lru()

PATCH Applied Miaohe Lin 1 participant 1 message Apr 28, 2022

Subsystems (3)
lore
Share & tools
lore

Miaohe Lin

author
#0 lore raw

PATCH 1/1 mm/vmscan: use helper folio_is_file_lru()

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

---
Hi Andrew,
Please feel free to squash this into below patch:
https://lore.kernel.org/all/[email protected]/T/#u
Thanks!

---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c +1 -1
index ecd74858b8d7..9ff3cc2a941a 100644
@@ -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;
Signature · 1 line
2.23.0