aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/os/linux/zfs/zpl_file.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c
index 8b84eb795..9a640fb40 100644
--- a/module/os/linux/zfs/zpl_file.c
+++ b/module/os/linux/zfs/zpl_file.c
@@ -674,11 +674,19 @@ zpl_readpage_common(struct page *pp)
return (error);
}
+#ifdef HAVE_VFS_READ_FOLIO
+static int
+zpl_read_folio(struct file *filp, struct folio *folio)
+{
+ return (zpl_readpage_common(&folio->page));
+}
+#else
static int
zpl_readpage(struct file *filp, struct page *pp)
{
return (zpl_readpage_common(pp));
}
+#endif
static int
zpl_readpage_filler(void *data, struct page *pp)
@@ -1208,7 +1216,11 @@ const struct address_space_operations zpl_address_space_operations = {
#else
.readahead = zpl_readahead,
#endif
+#ifdef HAVE_VFS_READ_FOLIO
+ .read_folio = zpl_read_folio,
+#else
.readpage = zpl_readpage,
+#endif
.writepage = zpl_writepage,
.writepages = zpl_writepages,
.direct_IO = zpl_direct_IO,