The patch titled Subject: fixup: mm/swap: stop using page->private on tail pages for THP_SWAP has been added to the -mm mm-unstable branch. Its filename is mm-swap-stop-using-page-private-on-tail-pages-for-thp_swap-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-swap-stop-using-page-private-on-tail-pages-for-thp_swap-fix.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: David Hildenbrand <david@xxxxxxxxxx> Subject: fixup: mm/swap: stop using page->private on tail pages for THP_SWAP Per Yoshry, use folio_page_idx(). It shouldn't make a difference for our (THP) use case, but it's certainly cleaner. Link: https://lkml.kernel.org/r/6f0a82a3-6948-20d9-580b-be1dbf415701@xxxxxxxxxx Signed-off-by: David Hildenbrand <david@xxxxxxxxxx> Reviewed-by: Yosry Ahmed <yosryahmed@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/swap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/swap.h~mm-swap-stop-using-page-private-on-tail-pages-for-thp_swap-fix +++ a/include/linux/swap.h @@ -344,7 +344,7 @@ static inline swp_entry_t page_swap_entr struct folio *folio = page_folio(page); swp_entry_t entry = folio_swap_entry(folio); - entry.val += page - &folio->page; + entry.val += folio_page_idx(folio, page); return entry; } _ Patches currently in -mm which might be from david@xxxxxxxxxx are mm-swap-stop-using-page-private-on-tail-pages-for-thp_swap.patch mm-swap-stop-using-page-private-on-tail-pages-for-thp_swap-fix.patch mm-swap-inline-folio_set_swap_entry-and-folio_swap_entry.patch mm-huge_memory-work-on-folio-swap-instead-of-page-private-when-splitting-folio.patch