mm: convert swap_cluster_readahead and swap_vma_readahead to return a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 13 Dec 2023 21:58:42 +0000 (21:58 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 Dec 2023 19:58:32 +0000 (11:58 -0800)
commita4575c4138db887bd27dc7f87cf7cfb0224c6f5e
treecaf1b69628705d083bb756e7d00f94e6be1d1624
parent6e03492e9d288d9ce886064289e2768da5d7d967
mm: convert swap_cluster_readahead and swap_vma_readahead to return a folio

shmem_swapin_cluster() immediately converts the page back to a folio, and
swapin_readahead() may as well call folio_file_page() once instead of
having each function call it.

[willy@infradead.org: avoid NULL pointer deref]
Link: https://lkml.kernel.org/r/ZYI7OcVlM1voKfBl@casper.infradead.org
Link: https://lkml.kernel.org/r/20231213215842.671461-14-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c
mm/swap.h
mm/swap_state.c