@@ -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",
@@ -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));
}
@@ -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
@@ -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;
@@ -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;
@@ -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;