mm: Convert swap_readpage to call read_folio instead of readpage
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 29 Apr 2022 15:51:22 +0000 (11:51 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 9 May 2022 20:21:46 +0000 (16:21 -0400)
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>
mm/page_io.c

index 89fbf3cae30f7cf58a0a1b83970ed8b17d627507..1ae4be14f9d3f7529c7660516151986a483f5909 100644 (file)
@@ -336,7 +336,7 @@ int swap_readpage(struct page *page, bool synchronous)
                struct file *swap_file = sis->swap_file;
                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)
                        count_vm_event(PSWPIN);
                goto out;