summaryrefslogtreecommitdiffstats
path: root/mm/swapfile.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-04-29 14:43:23 +0200
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-09 22:21:40 +0200
commit5efe7448a1426250b5747c10ad438517f44f1e51 (patch)
treeafe256df7b4de7af6d60304322efa36813f2016c /mm/swapfile.c
parentbuffer: Rewrite nobh_truncate_page() to use folios (diff)
downloadlinux-5efe7448a1426250b5747c10ad438517f44f1e51.tar.xz
linux-5efe7448a1426250b5747c10ad438517f44f1e51.zip
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>
Diffstat (limited to '')
-rw-r--r--mm/swapfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 63c61f8b2611..7c19098b8b45 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -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;
}