aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs/zpl_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/os/linux/zfs/zpl_file.c')
-rw-r--r--module/os/linux/zfs/zpl_file.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c
index 524c43dcd..0319148b9 100644
--- a/module/os/linux/zfs/zpl_file.c
+++ b/module/os/linux/zfs/zpl_file.c
@@ -591,8 +591,8 @@ zpl_mmap(struct file *filp, struct vm_area_struct *vma)
* only used to support mmap(2). There will be an identical copy of the
* data in the ARC which is kept up to date via .write() and .writepage().
*/
-static int
-zpl_readpage(struct file *filp, struct page *pp)
+static inline int
+zpl_readpage_common(struct page *pp)
{
struct inode *ip;
struct page *pl[1];
@@ -620,6 +620,18 @@ zpl_readpage(struct file *filp, struct page *pp)
return (error);
}
+static int
+zpl_readpage(struct file *filp, struct page *pp)
+{
+ return (zpl_readpage_common(pp));
+}
+
+static int
+zpl_readpage_filler(void *data, struct page *pp)
+{
+ return (zpl_readpage_common(pp));
+}
+
/*
* Populate a set of pages with data for the Linux page cache. This
* function will only be called for read ahead and never for demand
@@ -630,8 +642,7 @@ static int
zpl_readpages(struct file *filp, struct address_space *mapping,
struct list_head *pages, unsigned nr_pages)
{
- return (read_cache_pages(mapping, pages,
- (filler_t *)zpl_readpage, filp));
+ return (read_cache_pages(mapping, pages, zpl_readpage_filler, NULL));
}
static int