mm: Convert swap_readpage to call read_folio instead of readpage

This commit is split out so it can be dropped when resolving
conflicts with Neil Brown's series to stop calling ->readpage in
the swap code.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
This commit is contained in:
Matthew Wilcox (Oracle) 2022-04-29 11:51:22 -04:00
parent 4b4db9b4c7
commit 0f312591d6

View File

@ -336,7 +336,7 @@ int swap_readpage(struct page *page, bool synchronous)
struct file *swap_file = sis->swap_file; struct file *swap_file = sis->swap_file;
struct address_space *mapping = swap_file->f_mapping; struct address_space *mapping = swap_file->f_mapping;
ret = mapping->a_ops->readpage(swap_file, page); ret = mapping->a_ops->read_folio(swap_file, page_folio(page));
if (!ret) if (!ret)
count_vm_event(PSWPIN); count_vm_event(PSWPIN);
goto out; goto out;