[PATCH 3/8] mm/rmap: use folio_page_swap_entry() in ttu_anon_swapbacked_folio()
Tal Zussman
tz2294 at columbia.edu
Sun Aug 30 03:32:25 PDT 2026
We already have the folio here, so use folio_page_swap_entry() instead
of going through page_swap_entry(). This saves a call to
compound_head().
No functional change.
Signed-off-by: Tal Zussman <tz2294 at columbia.edu>
---
mm/rmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index fed0362e0bd0..ef34126c6ce8 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -2143,7 +2143,7 @@ static bool ttu_anon_swapbacked_folio(struct vm_area_struct *vma,
{
const bool anon_exclusive = folio_test_anon(folio) &&
PageAnonExclusive(page);
- swp_entry_t entry = page_swap_entry(page);
+ swp_entry_t entry = folio_page_swap_entry(folio, page);
struct mm_struct *mm = vma->vm_mm;
if (folio_dup_swap(folio, page) < 0)
--
2.39.5
More information about the linux-arm-kernel
mailing list