fs: Introduce aops->read_folio

Change all the callers of ->readpage to call ->read_folio in preference,
if it exists.  This is a transitional duplication, and will be removed
by the end of the series.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
This commit is contained in:
Matthew Wilcox (Oracle) 2022-04-29 08:43:23 -04:00
parent 6c2ae0d5db
commit 5efe7448a1
8 changed files with 28 additions and 13 deletions

View file

@ -3041,7 +3041,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
/*
* Read the swap header.
*/
if (!mapping->a_ops->readpage) {
if (!mapping->a_ops->read_folio && !mapping->a_ops->readpage) {
error = -EINVAL;
goto bad_swap_unlock_inode;
}