mm: return the folio from swapin_readahead
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 7 Aug 2024 19:37:32 +0000 (20:37 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Sep 2024 03:26:05 +0000 (20:26 -0700)
commit94dc8bffd8b7fe83ba8382a3410a2f218dc20cb0
treeefb2372e8f788ee781ef1770654ed0787ed007b5
parent09022bc196d23484a7a5d48cf373f8583e3fcf23
mm: return the folio from swapin_readahead

The unuse_pte_range() caller only wants the folio while do_swap_page()
wants both the page and the folio.  Since do_swap_page() already has logic
for handling both the folio and the page, move the folio-to-page logic
there.  This also lets us allocate larger folios in the SWP_SYNCHRONOUS_IO
path in future.

Link: https://lkml.kernel.org/r/20240807193734.1865400-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory.c
mm/swap.h
mm/swap_state.c
mm/swapfile.c