diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 5a5c021967d3f..d8e66c98db3ea 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -53,7 +53,7 @@ static int nfs_closedir(struct inode *, struct file *);
 static int nfs_readdir(struct file *, struct dir_context *);
 static int nfs_fsync_dir(struct file *, loff_t, loff_t, int);
 static loff_t nfs_llseek_dir(struct file *, loff_t, int);
-static void nfs_readdir_clear_array(struct page*);
+static void nfs_readdir_clear_array(struct address_space *, struct page*);
 
 const struct file_operations nfs_dir_operations = {
 	.llseek		= nfs_llseek_dir,
@@ -177,7 +177,8 @@ void nfs_readdir_init_array(struct page *page)
  * we are freeing strings created by nfs_add_to_readdir_array()
  */
 static
-void nfs_readdir_clear_array(struct page *page)
+void nfs_readdir_clear_array(struct address_space *__mapping,
+			     struct page *page)
 {
 	struct nfs_cache_array *array;
 	int i;
@@ -725,7 +726,7 @@ int nfs_readdir_filler(void *data, struct address_space *__mapping,
 	unlock_page(page);
 	return 0;
  error:
-	nfs_readdir_clear_array(page);
+	nfs_readdir_clear_array(MAPPING_NULL, page);
 	unlock_page(page);
 	return ret;
 }
@@ -875,7 +876,7 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc)
 	status = nfs_do_filldir(desc);
 
  out_release:
-	nfs_readdir_clear_array(desc->page);
+	nfs_readdir_clear_array(MAPPING_NULL, desc->page);
 	cache_page_release(desc);
  out:
 	dfprintk(DIRCACHE, "NFS: %s: returns %d\n",
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 1534dc2df6e5c..8b47bcbf0ca4d 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -526,7 +526,8 @@ static int orangefs_releasepage(struct address_space *__mapping,
 	return !PagePrivate(page);
 }
 
-static void orangefs_freepage(struct page *page)
+static void orangefs_freepage(struct address_space *__mapping,
+			      struct page *page)
 {
 	kfree(detach_page_private(page));
 }
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 989e505de9182..a952aa9d93e7f 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -400,7 +400,7 @@ struct address_space_operations {
 	void (*invalidatepage) (struct address_space *, struct page *,
 				unsigned int, unsigned int);
 	int (*releasepage) (struct address_space *, struct page *, gfp_t);
-	void (*freepage)(struct page *);
+	void (*freepage)(struct address_space *, struct page *);
 	ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter);
 	/*
 	 * migrate the contents of a page to the specified target. If
diff --git a/mm/filemap.c b/mm/filemap.c
index eccd5d0554851..faa190598cba8 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -243,7 +243,7 @@ static void page_cache_free_page(struct address_space *mapping,
 				struct page *page)
 {
 	if (mapping->a_ops->freepage)
-		mapping->a_ops->freepage(page);
+		mapping->a_ops->freepage(MAPPING_NULL, page);
 
 	if (PageTransHuge(page) && !PageHuge(page)) {
 		page_ref_sub(page, HPAGE_PMD_NR);
@@ -816,7 +816,7 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask)
 		__inc_lruvec_page_state(new, NR_SHMEM);
 	xas_unlock_irqrestore(&xas, flags);
 	if (mapping->a_ops->freepage)
-		mapping->a_ops->freepage(old);
+		mapping->a_ops->freepage(MAPPING_NULL, old);
 	put_page(old);
 
 	return 0;
diff --git a/mm/truncate.c b/mm/truncate.c
index e26b232b66c01..e24688115c903 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -653,7 +653,7 @@ invalidate_complete_page2(struct address_space *mapping, struct page *page)
 	xa_unlock_irqrestore(&mapping->i_pages, flags);
 
 	if (mapping->a_ops->freepage)
-		mapping->a_ops->freepage(page);
+		mapping->a_ops->freepage(MAPPING_NULL, page);
 
 	put_page(page);	/* pagecache ref */
 	return 1;
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 4322bc5ee2d84..bae7fb9c3512a 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -926,7 +926,7 @@ static int __remove_mapping(struct address_space *mapping, struct page *page,
 		xa_unlock_irqrestore(&mapping->i_pages, flags);
 
 		if (mapping->a_ops->freepage != NULL)
-			mapping->a_ops->freepage(page);
+			mapping->a_ops->freepage(MAPPING_NULL, page);
 	}
 
 	return 1;
