@@ -35,7 +35,8 @@
* @page: structure to page
*
*/
-static int v9fs_fid_readpage(void *data, struct page *page)
+static int v9fs_fid_readpage(void *data, struct address_space *__mapping,
+ struct page *page)
{
struct p9_fid *fid = data;
struct inode *inode = page->mapping->host;
@@ -80,9 +81,11 @@ static int v9fs_fid_readpage(void *data, struct page *page)
*
*/
-static int v9fs_vfs_readpage(struct file *filp, struct page *page)
+static int v9fs_vfs_readpage(struct file *filp,
+ struct address_space *__mapping,
+ struct page *page)
{
- return v9fs_fid_readpage(filp->private_data, page);
+ return v9fs_fid_readpage(filp->private_data, MAPPING_NULL, page);
}
/**
@@ -279,7 +282,7 @@ static int v9fs_write_begin(struct file *filp, struct address_space *mapping,
if (len == PAGE_SIZE)
goto out;
- retval = v9fs_fid_readpage(v9inode->writeback_fid, page);
+ retval = v9fs_fid_readpage(v9inode->writeback_fid, MAPPING_NULL, page);
put_page(page);
if (!retval)
goto start;
@@ -38,7 +38,8 @@ static int adfs_writepage(struct page *page, struct writeback_control *wbc)
return block_write_full_page(page, adfs_get_block, wbc);
}
-static int adfs_readpage(struct file *file, struct page *page)
+static int adfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page, adfs_get_block);
}
@@ -375,7 +375,8 @@ static int affs_writepage(struct page *page, struct writeback_control *wbc)
return block_write_full_page(page, affs_get_block, wbc);
}
-static int affs_readpage(struct file *file, struct page *page)
+static int affs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page, affs_get_block);
}
@@ -627,7 +628,8 @@ affs_extent_file_ofs(struct inode *inode, u32 newsize)
}
static int
-affs_readpage_ofs(struct file *file, struct page *page)
+affs_readpage_ofs(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
u32 to;
@@ -11,7 +11,9 @@
#include "affs.h"
-static int affs_symlink_readpage(struct file *file, struct page *page)
+static int affs_symlink_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
struct buffer_head *bh;
struct inode *inode = page->mapping->host;
@@ -17,7 +17,8 @@
#include "internal.h"
static int afs_file_mmap(struct file *file, struct vm_area_struct *vma);
-static int afs_readpage(struct file *file, struct page *page);
+static int afs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page);
static void afs_invalidatepage(struct page *page, unsigned int offset,
unsigned int length);
static int afs_releasepage(struct page *page, gfp_t gfp_flags);
@@ -388,7 +389,8 @@ int afs_page_filler(void *data, struct page *page)
* read page from file, directory or symlink, given a file to nominate the key
* to be used
*/
-static int afs_readpage(struct file *file, struct page *page)
+static int afs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
struct key *key;
int ret;
@@ -40,7 +40,8 @@ MODULE_LICENSE("GPL");
static int befs_readdir(struct file *, struct dir_context *);
static int befs_get_block(struct inode *, sector_t, struct buffer_head *, int);
-static int befs_readpage(struct file *file, struct page *page);
+static int befs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page);
static sector_t befs_bmap(struct address_space *mapping, sector_t block);
static struct dentry *befs_lookup(struct inode *, struct dentry *,
unsigned int);
@@ -48,7 +49,8 @@ static struct inode *befs_iget(struct super_block *, unsigned long);
static struct inode *befs_alloc_inode(struct super_block *sb);
static void befs_free_inode(struct inode *inode);
static void befs_destroy_inodecache(void);
-static int befs_symlink_readpage(struct file *, struct page *);
+static int befs_symlink_readpage(struct file *, struct address_space *,
+ struct page *);
static int befs_utf2nls(struct super_block *sb, const char *in, int in_len,
char **out, int *out_len);
static int befs_nls2utf(struct super_block *sb, const char *in, int in_len,
@@ -109,7 +111,8 @@ static const struct export_operations befs_export_operations = {
* positions to disk blocks.
*/
static int
-befs_readpage(struct file *file, struct page *page)
+befs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page, befs_get_block);
}
@@ -468,7 +471,9 @@ befs_destroy_inodecache(void)
* The data stream become link name. Unless the LONG_SYMLINK
* flag is set.
*/
-static int befs_symlink_readpage(struct file *unused, struct page *page)
+static int befs_symlink_readpage(struct file *unused,
+ struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
struct super_block *sb = inode->i_sb;
@@ -155,7 +155,8 @@ static int bfs_writepage(struct page *page, struct writeback_control *wbc)
return block_write_full_page(page, bfs_get_block, wbc);
}
-static int bfs_readpage(struct file *file, struct page *page)
+static int bfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page, bfs_get_block);
}
@@ -598,7 +598,9 @@ static int blkdev_writepage(struct page *page, struct writeback_control *wbc)
return block_write_full_page(page, blkdev_get_block, wbc);
}
-static int blkdev_readpage(struct file * file, struct page * page)
+static int blkdev_readpage(struct file * file,
+ struct address_space *__mapping,
+ struct page * page)
{
return block_read_full_page(page, blkdev_get_block);
}
@@ -2976,7 +2976,8 @@ int btrfs_bio_fits_in_stripe(struct page *page, size_t size, struct bio *bio,
unsigned long bio_flags);
void btrfs_set_range_writeback(struct extent_io_tree *tree, u64 start, u64 end);
vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf);
-int btrfs_readpage(struct file *file, struct page *page);
+int btrfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page);
void btrfs_evict_inode(struct inode *inode);
int btrfs_write_inode(struct inode *inode, struct writeback_control *wbc);
struct inode *btrfs_alloc_inode(struct super_block *sb);
@@ -951,7 +951,8 @@ static int btree_writepages(struct address_space *mapping,
return btree_write_cache_pages(mapping, wbc);
}
-static int btree_readpage(struct file *file, struct page *page)
+static int btree_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return extent_read_full_page(page, btree_get_extent, 0);
}
@@ -1385,7 +1385,7 @@ static int prepare_uptodate_page(struct inode *inode,
if (((pos & (PAGE_SIZE - 1)) || force_uptodate) &&
!PageUptodate(page)) {
- ret = btrfs_readpage(NULL, page);
+ ret = btrfs_readpage(NULL, MAPPING_NULL, page);
if (ret)
return ret;
lock_page(page);
@@ -386,7 +386,7 @@ static int io_ctl_prepare_pages(struct btrfs_io_ctl *io_ctl, bool uptodate)
}
io_ctl->pages[i] = page;
if (uptodate && !PageUptodate(page)) {
- btrfs_readpage(NULL, page);
+ btrfs_readpage(NULL, MAPPING_NULL, page);
lock_page(page);
if (page->mapping != inode->i_mapping) {
btrfs_err(BTRFS_I(inode)->root->fs_info,
@@ -4560,7 +4560,7 @@ int btrfs_truncate_block(struct inode *inode, loff_t from, loff_t len,
}
if (!PageUptodate(page)) {
- ret = btrfs_readpage(NULL, page);
+ ret = btrfs_readpage(NULL, MAPPING_NULL, page);
lock_page(page);
if (page->mapping != mapping) {
unlock_page(page);
@@ -8005,7 +8005,8 @@ static int btrfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
return extent_fiemap(inode, fieinfo, start, len);
}
-int btrfs_readpage(struct file *file, struct page *page)
+int btrfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return extent_read_full_page(page, btrfs_get_extent, 0);
}
@@ -1321,7 +1321,7 @@ static int cluster_pages_for_defrag(struct inode *inode,
}
if (!PageUptodate(page)) {
- btrfs_readpage(NULL, page);
+ btrfs_readpage(NULL, MAPPING_NULL, page);
lock_page(page);
if (!PageUptodate(page)) {
unlock_page(page);
@@ -2734,7 +2734,7 @@ static int relocate_file_extent_cluster(struct inode *inode,
}
if (!PageUptodate(page)) {
- btrfs_readpage(NULL, page);
+ btrfs_readpage(NULL, MAPPING_NULL, page);
lock_page(page);
if (!PageUptodate(page)) {
unlock_page(page);
@@ -4853,7 +4853,7 @@ static ssize_t fill_read_buf(struct send_ctx *sctx, u64 offset, u32 len)
}
if (!PageUptodate(page)) {
- btrfs_readpage(NULL, page);
+ btrfs_readpage(NULL, MAPPING_NULL, page);
lock_page(page);
if (!PageUptodate(page)) {
unlock_page(page);
@@ -2855,7 +2855,7 @@ int nobh_truncate_page(struct address_space *mapping,
/* Ok, it's mapped. Make sure it's up-to-date */
if (!PageUptodate(page)) {
- err = mapping->a_ops->readpage(NULL, page);
+ err = mapping->a_ops->readpage(NULL, MAPPING_NULL, page);
if (err) {
put_page(page);
goto out;
@@ -119,7 +119,7 @@ static int cachefiles_read_reissue(struct cachefiles_object *object,
goto unlock_discard;
_debug("reissue read");
- ret = bmapping->a_ops->readpage(NULL, backpage);
+ ret = bmapping->a_ops->readpage(NULL, MAPPING_NULL, backpage);
if (ret < 0)
goto unlock_discard;
}
@@ -281,7 +281,7 @@ static int cachefiles_read_backing_file_one(struct cachefiles_object *object,
newpage = NULL;
read_backing_page:
- ret = bmapping->a_ops->readpage(NULL, backpage);
+ ret = bmapping->a_ops->readpage(NULL, MAPPING_NULL, backpage);
if (ret < 0)
goto read_error;
@@ -519,7 +519,7 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object,
newpage = NULL;
reread_backing_page:
- ret = bmapping->a_ops->readpage(NULL, backpage);
+ ret = bmapping->a_ops->readpage(NULL, MAPPING_NULL, backpage);
if (ret < 0)
goto read_error;
@@ -288,7 +288,8 @@ static int ceph_do_readpage(struct file *filp, struct page *page)
return err < 0 ? err : 0;
}
-static int ceph_readpage(struct file *filp, struct page *page)
+static int ceph_readpage(struct file *filp, struct address_space *__mapping,
+ struct page *page)
{
int r = ceph_do_readpage(filp, page);
if (r != -EINPROGRESS)
@@ -4547,7 +4547,8 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
return rc;
}
-static int cifs_readpage(struct file *file, struct page *page)
+static int cifs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
loff_t offset = (loff_t)page->index << PAGE_SHIFT;
int rc = -EACCES;
@@ -20,7 +20,9 @@
#include "coda_psdev.h"
#include "coda_linux.h"
-static int coda_symlink_filler(struct file *file, struct page *page)
+static int coda_symlink_filler(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
int error;
@@ -817,7 +817,8 @@ static struct dentry *cramfs_lookup(struct inode *dir, struct dentry *dentry, un
return d_splice_alias(inode, dentry);
}
-static int cramfs_readpage(struct file *file, struct page *page)
+static int cramfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
u32 maxblock;
@@ -177,7 +177,9 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page,
*
* Returns zero on success; non-zero on error.
*/
-static int ecryptfs_readpage(struct file *file, struct page *page)
+static int ecryptfs_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
struct ecryptfs_crypt_stat *crypt_stat =
&ecryptfs_inode_to_private(page->mapping->host)->crypt_stat;
@@ -14,7 +14,8 @@
#include "efs.h"
#include <linux/efs_fs_sb.h>
-static int efs_readpage(struct file *file, struct page *page)
+static int efs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page,efs_get_block);
}
@@ -12,7 +12,9 @@
#include <linux/buffer_head.h>
#include "efs.h"
-static int efs_symlink_readpage(struct file *file, struct page *page)
+static int efs_symlink_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
char *link = page_address(page);
struct buffer_head * bh;
@@ -263,7 +263,9 @@ static inline struct bio *erofs_read_raw_page(struct bio *bio,
* since we dont have write or truncate flows, so no inode
* locking needs to be held at the moment.
*/
-static int erofs_raw_access_readpage(struct file *file, struct page *page)
+static int erofs_raw_access_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
erofs_off_t last_block;
struct bio *bio;
@@ -1271,7 +1271,9 @@ static void z_erofs_runqueue(struct super_block *sb,
z_erofs_decompress_queue(&io[JQ_SUBMIT], pagepool);
}
-static int z_erofs_readpage(struct file *file, struct page *page)
+static int z_erofs_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
struct inode *const inode = page->mapping->host;
struct z_erofs_decompress_frontend f = DECOMPRESS_FRONTEND_INIT(inode);
@@ -359,7 +359,8 @@ static int exfat_get_block(struct inode *inode, sector_t iblock,
return err;
}
-static int exfat_readpage(struct file *file, struct page *page)
+static int exfat_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return mpage_readpage(page, exfat_get_block);
}
@@ -870,7 +870,8 @@ static int ext2_writepage(struct page *page, struct writeback_control *wbc)
return block_write_full_page(page, ext2_get_block, wbc);
}
-static int ext2_readpage(struct file *file, struct page *page)
+static int ext2_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return mpage_readpage(page, ext2_get_block);
}
@@ -3214,7 +3214,8 @@ static sector_t ext4_bmap(struct address_space *mapping, sector_t block)
return iomap_bmap(mapping, block, &ext4_iomap_ops);
}
-static int ext4_readpage(struct file *file, struct page *page)
+static int ext4_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
int ret = -EAGAIN;
struct inode *inode = page->mapping->host;
@@ -2445,7 +2445,9 @@ static int f2fs_mpage_readpages(struct inode *inode,
return ret;
}
-static int f2fs_read_data_page(struct file *file, struct page *page)
+static int f2fs_read_data_page(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page_file_mapping(page)->host;
int ret = -EAGAIN;
@@ -205,7 +205,8 @@ static int fat_writepages(struct address_space *mapping,
return mpage_writepages(mapping, wbc, fat_get_block);
}
-static int fat_readpage(struct file *file, struct page *page)
+static int fat_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return mpage_readpage(page, fat_get_block);
}
@@ -38,7 +38,8 @@
#include "vxfs_inode.h"
-static int vxfs_immed_readpage(struct file *, struct page *);
+static int vxfs_immed_readpage(struct file *, struct address_space *,
+ struct page *);
/*
* Address space operations for immed files and directories.
@@ -63,7 +64,8 @@ const struct address_space_operations vxfs_immed_aops = {
* @page is locked and will be unlocked.
*/
static int
-vxfs_immed_readpage(struct file *fp, struct page *pp)
+vxfs_immed_readpage(struct file *fp, struct address_space *__mapping,
+ struct page *pp)
{
struct vxfs_inode_info *vip = VXFS_INO(pp->mapping->host);
u_int64_t offset = (u_int64_t)pp->index << PAGE_SHIFT;
@@ -38,7 +38,8 @@
#include "vxfs_extern.h"
-static int vxfs_readpage(struct file *, struct page *);
+static int vxfs_readpage(struct file *, struct address_space *,
+ struct page *);
static sector_t vxfs_bmap(struct address_space *, sector_t);
const struct address_space_operations vxfs_aops = {
@@ -156,7 +157,8 @@ vxfs_getblk(struct inode *ip, sector_t iblock,
* @page is locked and will be unlocked.
*/
static int
-vxfs_readpage(struct file *file, struct page *page)
+vxfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page, vxfs_getblk);
}
@@ -1770,7 +1770,9 @@ void fuse_init_dir(struct inode *inode)
fi->rdc.version = 0;
}
-static int fuse_symlink_readpage(struct file *null, struct page *page)
+static int fuse_symlink_readpage(struct file *null,
+ struct address_space *__mapping,
+ struct page *page)
{
int err = fuse_readlink_page(page->mapping->host, page);
@@ -839,7 +839,8 @@ static int fuse_do_readpage(struct file *file, struct page *page)
return 0;
}
-static int fuse_readpage(struct file *file, struct page *page)
+static int fuse_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
int err;
@@ -468,7 +468,8 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
}
-static int __gfs2_readpage(void *file, struct page *page)
+static int __gfs2_readpage(void *file, struct address_space *__mapping,
+ struct page *page)
{
struct gfs2_inode *ip = GFS2_I(page->mapping->host);
struct gfs2_sbd *sdp = GFS2_SB(page->mapping->host);
@@ -496,9 +497,10 @@ static int __gfs2_readpage(void *file, struct page *page)
* @page: The page of the file
*/
-static int gfs2_readpage(struct file *file, struct page *page)
+static int gfs2_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
- return __gfs2_readpage(file, page);
+ return __gfs2_readpage(file, MAPPING_NULL, page);
}
/**
@@ -34,7 +34,8 @@ static int hfs_writepage(struct page *page, struct writeback_control *wbc)
return block_write_full_page(page, hfs_get_block, wbc);
}
-static int hfs_readpage(struct file *file, struct page *page)
+static int hfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page, hfs_get_block);
}
@@ -22,7 +22,9 @@
#include "hfsplus_raw.h"
#include "xattr.h"
-static int hfsplus_readpage(struct file *file, struct page *page)
+static int hfsplus_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page, hfsplus_get_block);
}
@@ -431,7 +431,8 @@ static int hostfs_writepage(struct page *page, struct writeback_control *wbc)
return err;
}
-static int hostfs_readpage(struct file *file, struct page *page)
+static int hostfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
char *buffer;
loff_t start = page_offset(page);
@@ -116,7 +116,8 @@ static int hpfs_get_block(struct inode *inode, sector_t iblock, struct buffer_he
return r;
}
-static int hpfs_readpage(struct file *file, struct page *page)
+static int hpfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return mpage_readpage(page, hpfs_get_block);
}
@@ -475,7 +475,9 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry)
return err;
}
-static int hpfs_symlink_readpage(struct file *file, struct page *page)
+static int hpfs_symlink_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
char *link = page_address(page);
struct inode *i = page->mapping->host;
@@ -296,7 +296,8 @@ static int zisofs_fill_pages(struct inode *inode, int full_page, int pcount,
* per reference. We inject the additional pages into the page
* cache as a form of readahead.
*/
-static int zisofs_readpage(struct file *file, struct page *page)
+static int zisofs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = file_inode(file);
struct address_space *mapping = inode->i_mapping;
@@ -1175,7 +1175,8 @@ struct buffer_head *isofs_bread(struct inode *inode, sector_t block)
return sb_bread(inode->i_sb, blknr);
}
-static int isofs_readpage(struct file *file, struct page *page)
+static int isofs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return mpage_readpage(page, isofs_get_block);
}
@@ -690,7 +690,9 @@ int parse_rock_ridge_inode(struct iso_directory_record *de, struct inode *inode,
* readpage() for symlinks: reads symlink contents into the page and either
* makes it uptodate and returns 0 or returns error (-EIO)
*/
-static int rock_ridge_symlink_readpage(struct file *file, struct page *page)
+static int rock_ridge_symlink_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
struct iso_inode_info *ei = ISOFS_I(inode);
@@ -27,7 +27,8 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping,
static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags,
struct page **pagep, void **fsdata);
-static int jffs2_readpage (struct file *filp, struct page *pg);
+static int jffs2_readpage (struct file *filp, struct address_space *__mapping,
+ struct page *pg);
int jffs2_fsync(struct file *filp, loff_t start, loff_t end, int datasync)
{
@@ -109,7 +110,8 @@ static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg)
return ret;
}
-int jffs2_do_readpage_unlock(void *data, struct page *pg)
+int jffs2_do_readpage_unlock(void *data, struct address_space *__mapping,
+ struct page *pg)
{
int ret = jffs2_do_readpage_nolock(data, pg);
unlock_page(pg);
@@ -117,13 +119,14 @@ int jffs2_do_readpage_unlock(void *data, struct page *pg)
}
-static int jffs2_readpage (struct file *filp, struct page *pg)
+static int jffs2_readpage (struct file *filp, struct address_space *__mapping,
+ struct page *pg)
{
struct jffs2_inode_info *f = JFFS2_INODE_INFO(pg->mapping->host);
int ret;
mutex_lock(&f->sem);
- ret = jffs2_do_readpage_unlock(pg->mapping->host, pg);
+ ret = jffs2_do_readpage_unlock(pg->mapping->host, MAPPING_NULL, pg);
mutex_unlock(&f->sem);
return ret;
}
@@ -155,7 +155,8 @@ extern const struct file_operations jffs2_file_operations;
extern const struct inode_operations jffs2_file_inode_operations;
extern const struct address_space_operations jffs2_file_address_operations;
int jffs2_fsync(struct file *, loff_t, loff_t, int);
-int jffs2_do_readpage_unlock(void *data, struct page *pg);
+int jffs2_do_readpage_unlock(void *data, struct address_space *__mapping,
+ struct page *pg);
/* ioctl.c */
long jffs2_ioctl(struct file *, unsigned int, unsigned long);
@@ -291,7 +291,8 @@ static int jfs_writepages(struct address_space *mapping,
return mpage_writepages(mapping, wbc, jfs_get_block);
}
-static int jfs_readpage(struct file *file, struct page *page)
+static int jfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return mpage_readpage(page, jfs_get_block);
}
@@ -468,7 +468,8 @@ static int metapage_writepage(struct page *page, struct writeback_control *wbc)
return -EIO;
}
-static int metapage_readpage(struct file *fp, struct page *page)
+static int metapage_readpage(struct file *fp, struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
struct bio *bio = NULL;
@@ -507,7 +507,8 @@ int simple_setattr(struct dentry *dentry, struct iattr *iattr)
}
EXPORT_SYMBOL(simple_setattr);
-int simple_readpage(struct file *file, struct page *page)
+int simple_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
clear_highpage(page);
flush_dcache_page(page);
@@ -403,7 +403,8 @@ static int minix_writepage(struct page *page, struct writeback_control *wbc)
return block_write_full_page(page, minix_get_block, wbc);
}
-static int minix_readpage(struct file *file, struct page *page)
+static int minix_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page,minix_get_block);
}
@@ -706,7 +706,8 @@ int nfs_readdir_xdr_to_array(nfs_readdir_descriptor_t *desc, struct page *page,
* We only need to convert from xdr once so future lookups are much simpler
*/
static
-int nfs_readdir_filler(void *data, struct page* page)
+int nfs_readdir_filler(void *data, struct address_space *__mapping,
+ struct page* page)
{
nfs_readdir_descriptor_t *desc = data;
struct inode *inode = file_inode(desc->file);
@@ -341,7 +341,7 @@ static int nfs_write_begin(struct file *file, struct address_space *mapping,
} else if (!once_thru &&
nfs_want_read_modify_write(file, page, pos, len)) {
once_thru = 1;
- ret = nfs_readpage(file, page);
+ ret = nfs_readpage(file, MAPPING_NULL, page);
put_page(page);
if (!ret)
goto start;
@@ -310,7 +310,8 @@ static void nfs_readpage_result(struct rpc_task *task,
* - The error flag is set for this page. This happens only when a
* previous async read operation failed.
*/
-int nfs_readpage(struct file *file, struct page *page)
+int nfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
struct nfs_open_context *ctx;
struct inode *inode = page_file_mapping(page)->host;
@@ -373,7 +374,8 @@ struct nfs_readdesc {
};
static int
-readpage_async_filler(void *data, struct page *page)
+readpage_async_filler(void *data, struct address_space *__mapping,
+ struct page *page)
{
struct nfs_readdesc *desc = (struct nfs_readdesc *)data;
struct nfs_page *new;
@@ -26,7 +26,8 @@
* and straight-forward than readdir caching.
*/
-static int nfs_symlink_filler(void *data, struct page *page)
+static int nfs_symlink_filler(void *data, struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = data;
int error;
@@ -141,7 +141,8 @@ int nilfs_get_block(struct inode *inode, sector_t blkoff,
* @file - file struct of the file to be read
* @page - the page to be read
*/
-static int nilfs_readpage(struct file *file, struct page *page)
+static int nilfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return mpage_readpage(page, nilfs_get_block);
}
@@ -375,7 +375,8 @@ static int ntfs_read_block(struct page *page)
*
* Return 0 on success and -errno on error.
*/
-static int ntfs_readpage(struct file *file, struct page *page)
+static int ntfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
loff_t i_size;
struct inode *vi;
@@ -277,7 +277,8 @@ static int ocfs2_readpage_inline(struct inode *inode, struct page *page)
return ret;
}
-static int ocfs2_readpage(struct file *file, struct page *page)
+static int ocfs2_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
struct ocfs2_inode_info *oi = OCFS2_I(inode);
@@ -54,7 +54,9 @@
#include "buffer_head_io.h"
-static int ocfs2_fast_symlink_readpage(struct file *unused, struct page *page)
+static int ocfs2_fast_symlink_readpage(struct file *unused,
+ struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
struct buffer_head *bh = NULL;
@@ -284,7 +284,8 @@ static int omfs_get_block(struct inode *inode, sector_t block,
return ret;
}
-static int omfs_readpage(struct file *file, struct page *page)
+static int omfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page, omfs_get_block);
}
@@ -244,7 +244,9 @@ static int orangefs_writepages(struct address_space *mapping,
static int orangefs_launder_page(struct page *);
-static int orangefs_readpage(struct file *file, struct page *page)
+static int orangefs_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
struct iov_iter iter;
@@ -246,7 +246,8 @@ static void qnx4_kill_sb(struct super_block *sb)
}
}
-static int qnx4_readpage(struct file *file, struct page *page)
+static int qnx4_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page,qnx4_get_block);
}
@@ -94,7 +94,8 @@ static int qnx6_check_blockptr(__fs32 ptr)
return 1;
}
-static int qnx6_readpage(struct file *file, struct page *page)
+static int qnx6_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return mpage_readpage(page, qnx6_get_block);
}
@@ -2738,7 +2738,8 @@ static int reiserfs_write_full_page(struct page *page,
goto done;
}
-static int reiserfs_readpage(struct file *f, struct page *page)
+static int reiserfs_readpage(struct file *f, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page, reiserfs_get_block);
}
@@ -99,7 +99,8 @@ static struct inode *romfs_iget(struct super_block *sb, unsigned long pos);
/*
* read a page worth of data from the image
*/
-static int romfs_readpage(struct file *file, struct page *page)
+static int romfs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
loff_t offset, size;
@@ -444,7 +444,9 @@ static int squashfs_readpage_sparse(struct page *page, int expected)
return 0;
}
-static int squashfs_readpage(struct file *file, struct page *page)
+static int squashfs_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
@@ -30,7 +30,9 @@
#include "squashfs.h"
#include "xattr.h"
-static int squashfs_symlink_readpage(struct file *file, struct page *page)
+static int squashfs_symlink_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
struct super_block *sb = inode->i_sb;
@@ -456,7 +456,8 @@ static int sysv_writepage(struct page *page, struct writeback_control *wbc)
return block_write_full_page(page,get_block,wbc);
}
-static int sysv_readpage(struct file *file, struct page *page)
+static int sysv_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page,get_block);
}
@@ -890,7 +890,8 @@ static int ubifs_bulk_read(struct page *page)
return err;
}
-static int ubifs_readpage(struct file *file, struct page *page)
+static int ubifs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
if (ubifs_bulk_read(page))
return 0;
@@ -57,7 +57,9 @@ static void __udf_adinicb_readpage(struct page *page)
kunmap_atomic(kaddr);
}
-static int udf_adinicb_readpage(struct file *file, struct page *page)
+static int udf_adinicb_readpage(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
BUG_ON(!PageLocked(page));
__udf_adinicb_readpage(page);
@@ -190,7 +190,8 @@ static int udf_writepages(struct address_space *mapping,
return mpage_writepages(mapping, wbc, udf_get_block);
}
-static int udf_readpage(struct file *file, struct page *page)
+static int udf_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return mpage_readpage(page, udf_get_block);
}
@@ -101,7 +101,9 @@ static int udf_pc_to_char(struct super_block *sb, unsigned char *from,
return 0;
}
-static int udf_symlink_filler(struct file *file, struct page *page)
+static int udf_symlink_filler(struct file *file,
+ struct address_space *__mapping,
+ struct page *page)
{
struct inode *inode = page->mapping->host;
struct buffer_head *bh = NULL;
@@ -472,7 +472,8 @@ static int ufs_writepage(struct page *page, struct writeback_control *wbc)
return block_write_full_page(page,ufs_getfrag_block,wbc);
}
-static int ufs_readpage(struct file *file, struct page *page)
+static int ufs_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
return block_read_full_page(page,ufs_getfrag_block);
}
@@ -208,7 +208,8 @@ const struct inode_operations vboxsf_reg_iops = {
.setattr = vboxsf_setattr
};
-static int vboxsf_readpage(struct file *file, struct page *page)
+static int vboxsf_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page)
{
struct vboxsf_handle *sf_handle = file->private_data;
loff_t off = page_offset(page);
@@ -616,7 +616,7 @@ xfs_vm_bmap(
STATIC int
xfs_vm_readpage(
struct file *unused,
- struct page *page)
+ struct address_space *__mapping, struct page *page)
{
return iomap_readpage(page, &xfs_read_iomap_ops);
}
@@ -74,7 +74,8 @@ static const struct iomap_ops zonefs_iomap_ops = {
.iomap_begin = zonefs_iomap_begin,
};
-static int zonefs_readpage(struct file *unused, struct page *page)
+static int zonefs_readpage(struct file *unused,
+ struct address_space *__mapping, struct page *page)
{
return iomap_readpage(page, &zonefs_iomap_ops);
}
@@ -371,7 +371,7 @@ typedef int (*read_actor_t)(read_descriptor_t *, struct page *,
struct address_space_operations {
int (*writepage)(struct page *page, struct writeback_control *wbc);
- int (*readpage)(struct file *, struct page *);
+ int (*readpage)(struct file *, struct address_space *, struct page *);
/* Write back some dirty pages from this mapping. */
int (*writepages)(struct address_space *, struct writeback_control *);
@@ -3227,7 +3227,8 @@ extern void noop_invalidatepage(struct page *page, unsigned int offset,
unsigned int length);
extern ssize_t noop_direct_IO(struct kiocb *iocb, struct iov_iter *iter);
extern int simple_empty(struct dentry *);
-extern int simple_readpage(struct file *file, struct page *page);
+extern int simple_readpage(struct file *file, struct address_space *__mapping,
+ struct page *page);
extern int simple_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags,
struct page **pagep, void **fsdata);
@@ -562,7 +562,7 @@ nfs_have_writebacks(struct inode *inode)
/*
* linux/fs/nfs/read.c
*/
-extern int nfs_readpage(struct file *, struct page *);
+extern int nfs_readpage(struct file *, struct address_space *, struct page *);
extern int nfs_readpages(struct file *, struct address_space *,
struct list_head *, unsigned);
extern int nfs_readpage_async(struct nfs_open_context *, struct inode *,
@@ -264,7 +264,7 @@ static inline gfp_t readahead_gfp_mask(struct address_space *x)
return mapping_gfp_mask(x) | __GFP_NORETRY | __GFP_NOWARN;
}
-typedef int (*filler_t)(void *, struct page *);
+typedef int (*filler_t)(void *, struct address_space *, struct page *);
pgoff_t page_cache_next_miss(struct address_space *mapping,
pgoff_t index, unsigned long max_scan);
@@ -2349,7 +2349,7 @@ ssize_t generic_file_buffered_read(struct kiocb *iocb,
*/
ClearPageError(page);
/* Start the actual read. The read will unlock the page. */
- error = mapping->a_ops->readpage(filp, page);
+ error = mapping->a_ops->readpage(filp, MAPPING_NULL, page);
if (unlikely(error)) {
if (error == AOP_TRUNCATED_PAGE) {
@@ -2751,7 +2751,7 @@ vm_fault_t filemap_fault(struct vm_fault *vmf)
*/
ClearPageError(page);
fpin = maybe_unlock_mmap_for_io(vmf, fpin);
- error = mapping->a_ops->readpage(file, page);
+ error = mapping->a_ops->readpage(file, MAPPING_NULL, page);
if (!error) {
wait_on_page_locked(page);
if (!PageUptodate(page))
@@ -2961,9 +2961,10 @@ static struct page *do_read_cache_page(struct address_space *mapping,
filler:
if (filler)
- err = filler(data, page);
+ err = filler(data, MAPPING_NULL, page);
else
- err = mapping->a_ops->readpage(data, page);
+ err = mapping->a_ops->readpage(data, MAPPING_NULL,
+ page);
if (err < 0) {
put_page(page);
@@ -397,7 +397,7 @@ int swap_readpage(struct page *page, bool synchronous)
struct file *swap_file = sis->swap_file;
struct address_space *mapping = swap_file->f_mapping;
- ret = mapping->a_ops->readpage(swap_file, page);
+ ret = mapping->a_ops->readpage(swap_file, MAPPING_NULL, page);
if (!ret)
count_vm_event(PSWPIN);
goto out;
@@ -102,7 +102,7 @@ int read_cache_pages(struct address_space *mapping, struct list_head *pages,
}
put_page(page);
- ret = filler(data, page);
+ ret = filler(data, MAPPING_NULL, page);
if (unlikely(ret)) {
read_cache_pages_invalidate_pages(mapping, pages);
break;
@@ -142,7 +142,7 @@ static void read_pages(struct readahead_control *rac, struct list_head *pages,
rac->_nr_pages = 0;
} else {
while ((page = readahead_page(rac))) {
- aops->readpage(rac->file, page);
+ aops->readpage(rac->file, MAPPING_NULL, page);
put_page(page);
}
}