@@ -266,7 +266,8 @@ shmem_writeback(struct drm_i915_gem_object *obj)
int ret;
SetPageReclaim(page);
- ret = mapping->a_ops->writepage(page, &wbc);
+ ret = mapping->a_ops->writepage(MAPPING_NULL, page,
+ &wbc);
if (!PageWriteback(page))
ClearPageReclaim(page);
if (!ret)
@@ -178,7 +178,9 @@ static int v9fs_vfs_writepage_locked(struct page *page)
return err;
}
-static int v9fs_vfs_writepage(struct page *page, struct writeback_control *wbc)
+static int v9fs_vfs_writepage(struct address_space *__mapping,
+ struct page *page,
+ struct writeback_control *wbc)
{
int retval;
@@ -33,7 +33,8 @@ adfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh,
return 0;
}
-static int adfs_writepage(struct page *page, struct writeback_control *wbc)
+static int adfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, adfs_get_block, wbc);
}
@@ -370,7 +370,8 @@ affs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh_resul
return -ENOSPC;
}
-static int affs_writepage(struct page *page, struct writeback_control *wbc)
+static int affs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, affs_get_block, wbc);
}
@@ -1429,7 +1429,8 @@ extern int afs_write_begin(struct file *file, struct address_space *mapping,
extern int afs_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata);
-extern int afs_writepage(struct page *, struct writeback_control *);
+extern int afs_writepage(struct address_space *__mapping, struct page *,
+ struct writeback_control *);
extern int afs_writepages(struct address_space *, struct writeback_control *);
extern ssize_t afs_file_write(struct kiocb *, struct iov_iter *);
extern int afs_fsync(struct file *, loff_t, loff_t, int);
@@ -647,7 +647,8 @@ static int afs_write_back_from_locked_page(struct address_space *mapping,
* write a page back to the server
* - the caller locked the page for us
*/
-int afs_writepage(struct page *page, struct writeback_control *wbc)
+int afs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
int ret;
@@ -150,7 +150,8 @@ static int bfs_get_block(struct inode *inode, sector_t block,
return err;
}
-static int bfs_writepage(struct page *page, struct writeback_control *wbc)
+static int bfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, bfs_get_block, wbc);
}
@@ -593,7 +593,8 @@ int thaw_bdev(struct block_device *bdev, struct super_block *sb)
}
EXPORT_SYMBOL(thaw_bdev);
-static int blkdev_writepage(struct page *page, struct writeback_control *wbc)
+static int blkdev_writepage(struct address_space *__mapping,
+ struct page *page, struct writeback_control *wbc)
{
return block_write_full_page(page, blkdev_get_block, wbc);
}
@@ -8011,7 +8011,8 @@ int btrfs_readpage(struct file *file, struct address_space *__mapping,
return extent_read_full_page(page, btrfs_get_extent, 0);
}
-static int btrfs_writepage(struct page *page, struct writeback_control *wbc)
+static int btrfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
struct inode *inode = page->mapping->host;
int ret;
@@ -761,7 +761,8 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
return err;
}
-static int ceph_writepage(struct page *page, struct writeback_control *wbc)
+static int ceph_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
int err;
struct inode *inode = page->mapping->host;
@@ -2516,7 +2516,8 @@ cifs_writepage_locked(struct page *page, struct writeback_control *wbc)
return rc;
}
-static int cifs_writepage(struct page *page, struct writeback_control *wbc)
+static int cifs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
int rc = cifs_writepage_locked(page, wbc);
unlock_page(page);
@@ -48,7 +48,9 @@ struct page *ecryptfs_get_locked_page(struct inode *inode, loff_t index)
* the lower filesystem. In OpenPGP-compatible mode, we operate on
* entire underlying packets.
*/
-static int ecryptfs_writepage(struct page *page, struct writeback_control *wbc)
+static int ecryptfs_writepage(struct address_space *__mapping,
+ struct page *page,
+ struct writeback_control *wbc)
{
int rc;
@@ -370,7 +370,8 @@ static void exfat_readahead(struct readahead_control *rac)
mpage_readahead(rac, exfat_get_block);
}
-static int exfat_writepage(struct page *page, struct writeback_control *wbc)
+static int exfat_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, exfat_get_block, wbc);
}
@@ -865,7 +865,8 @@ int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
ext2_get_block);
}
-static int ext2_writepage(struct page *page, struct writeback_control *wbc)
+static int ext2_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, ext2_get_block, wbc);
}
@@ -921,8 +922,9 @@ ext2_nobh_write_begin(struct file *file, struct address_space *mapping,
return ret;
}
-static int ext2_nobh_writepage(struct page *page,
- struct writeback_control *wbc)
+static int ext2_nobh_writepage(struct address_space *__mapping,
+ struct page *page,
+ struct writeback_control *wbc)
{
return nobh_writepage(page, ext2_get_block, wbc);
}
@@ -1969,7 +1969,7 @@ static int __ext4_journalled_writepage(struct page *page,
* But since we don't do any block allocation we should not deadlock.
* Page also have the dirty flag cleared so we don't get recurive page_lock.
*/
-static int ext4_writepage(struct page *page,
+static int ext4_writepage(struct address_space *__mapping, struct page *page,
struct writeback_control *wbc)
{
int ret = 0;
@@ -324,7 +324,8 @@ static int __f2fs_write_meta_page(struct page *page,
return AOP_WRITEPAGE_ACTIVATE;
}
-static int f2fs_write_meta_page(struct page *page,
+static int f2fs_write_meta_page(struct address_space *__mapping,
+ struct page *page,
struct writeback_control *wbc)
{
return __f2fs_write_meta_page(page, wbc, FS_META_IO);
@@ -2893,7 +2893,8 @@ int f2fs_write_single_data_page(struct page *page, int *submitted,
return err;
}
-static int f2fs_write_data_page(struct page *page,
+static int f2fs_write_data_page(struct address_space *__mapping,
+ struct page *page,
struct writeback_control *wbc)
{
#ifdef CONFIG_F2FS_FS_COMPRESSION
@@ -1650,7 +1650,8 @@ int f2fs_move_node_page(struct page *node_page, int gc_type)
return err;
}
-static int f2fs_write_node_page(struct page *page,
+static int f2fs_write_node_page(struct address_space *__mapping,
+ struct page *page,
struct writeback_control *wbc)
{
return __write_node_page(page, false, NULL, wbc, false,
@@ -194,7 +194,8 @@ static int fat_get_block(struct inode *inode, sector_t iblock,
return 0;
}
-static int fat_writepage(struct page *page, struct writeback_control *wbc)
+static int fat_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, fat_get_block, wbc);
}
@@ -1886,7 +1886,8 @@ static int fuse_writepage_locked(struct page *page)
return error;
}
-static int fuse_writepage(struct page *page, struct writeback_control *wbc)
+static int fuse_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
int err;
@@ -86,7 +86,8 @@ static int gfs2_get_block_noalloc(struct inode *inode, sector_t lblock,
* @page: The page
* @wbc: The writeback control
*/
-static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
+static int gfs2_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
struct inode *inode = page->mapping->host;
struct gfs2_inode *ip = GFS2_I(inode);
@@ -178,7 +179,9 @@ static int __gfs2_jdata_writepage(struct page *page, struct writeback_control *w
*
*/
-static int gfs2_jdata_writepage(struct page *page, struct writeback_control *wbc)
+static int gfs2_jdata_writepage(struct address_space *__mapping,
+ struct page *page,
+ struct writeback_control *wbc)
{
struct inode *inode = page->mapping->host;
struct gfs2_inode *ip = GFS2_I(inode);
@@ -30,7 +30,9 @@
#include "util.h"
#include "trace_gfs2.h"
-static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wbc)
+static int gfs2_aspace_writepage(struct address_space *__mapping,
+ struct page *page,
+ struct writeback_control *wbc)
{
struct buffer_head *bh, *head;
int nr_underway = 0;
@@ -29,7 +29,8 @@ static const struct inode_operations hfs_file_inode_operations;
#define HFS_VALID_MODE_BITS (S_IFREG | S_IFDIR | S_IRWXUGO)
-static int hfs_writepage(struct page *page, struct writeback_control *wbc)
+static int hfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, hfs_get_block, wbc);
}
@@ -29,7 +29,8 @@ static int hfsplus_readpage(struct file *file,
return block_read_full_page(page, hfsplus_get_block);
}
-static int hfsplus_writepage(struct page *page, struct writeback_control *wbc)
+static int hfsplus_writepage(struct address_space *__mapping,
+ struct page *page, struct writeback_control *wbc)
{
return block_write_full_page(page, hfsplus_get_block, wbc);
}
@@ -396,7 +396,8 @@ static const struct file_operations hostfs_dir_fops = {
.fsync = hostfs_fsync,
};
-static int hostfs_writepage(struct page *page, struct writeback_control *wbc)
+static int hostfs_writepage(struct address_space *__mapping,
+ struct page *page, struct writeback_control *wbc)
{
struct address_space *mapping = page->mapping;
struct inode *inode = mapping->host;
@@ -122,7 +122,8 @@ static int hpfs_readpage(struct file *file, struct address_space *__mapping,
return mpage_readpage(page, hpfs_get_block);
}
-static int hpfs_writepage(struct page *page, struct writeback_control *wbc)
+static int hpfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, hpfs_get_block, wbc);
}
@@ -280,7 +280,8 @@ int jfs_get_block(struct inode *ip, sector_t lblock,
return rc;
}
-static int jfs_writepage(struct page *page, struct writeback_control *wbc)
+static int jfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, jfs_get_block, wbc);
}
@@ -332,7 +332,9 @@ static void metapage_write_end_io(struct bio *bio)
bio_put(bio);
}
-static int metapage_writepage(struct page *page, struct writeback_control *wbc)
+static int metapage_writepage(struct address_space *__mapping,
+ struct page *page,
+ struct writeback_control *wbc)
{
struct bio *bio = NULL;
int block_offset; /* block offset of mp within page */
@@ -398,7 +398,8 @@ static int minix_get_block(struct inode *inode, sector_t block,
return V2_minix_get_block(inode, block, bh_result, create);
}
-static int minix_writepage(struct page *page, struct writeback_control *wbc)
+static int minix_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, minix_get_block, wbc);
}
@@ -659,7 +659,7 @@ static int __mpage_writepage(struct page *page, struct writeback_control *wbc,
bio = mpage_bio_submit(REQ_OP_WRITE, op_flags, bio);
if (mpd->use_writepage) {
- ret = mapping->a_ops->writepage(page, wbc);
+ ret = mapping->a_ops->writepage(MAPPING_NULL, page, wbc);
} else {
ret = -EAGAIN;
goto out;
@@ -683,7 +683,8 @@ static int nfs_writepage_locked(struct page *page,
return 0;
}
-int nfs_writepage(struct page *page, struct writeback_control *wbc)
+int nfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
int ret;
@@ -170,7 +170,8 @@ static int nilfs_writepages(struct address_space *mapping,
return err;
}
-static int nilfs_writepage(struct page *page, struct writeback_control *wbc)
+static int nilfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
struct inode *inode = page->mapping->host;
int err;
@@ -398,7 +398,8 @@ int nilfs_mdt_fetch_dirty(struct inode *inode)
}
static int
-nilfs_mdt_write_page(struct page *page, struct writeback_control *wbc)
+nilfs_mdt_write_page(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
struct inode *inode = page->mapping->host;
struct super_block *sb;
@@ -1334,7 +1334,8 @@ static int ntfs_write_mst_block(struct page *page,
*
* Return 0 on success and -errno on error.
*/
-static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
+static int ntfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
loff_t i_size;
struct inode *vi = page->mapping->host;
@@ -401,7 +401,8 @@ static void ocfs2_readahead(struct readahead_control *rac)
* mapping can't have disappeared under the dirty pages that it is
* being asked to write back.
*/
-static int ocfs2_writepage(struct page *page, struct writeback_control *wbc)
+static int ocfs2_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
trace_ocfs2_writepage(
(unsigned long long)OCFS2_I(page->mapping->host)->ip_blkno,
@@ -295,7 +295,8 @@ static void omfs_readahead(struct readahead_control *rac)
mpage_readahead(rac, omfs_get_block);
}
-static int omfs_writepage(struct page *page, struct writeback_control *wbc)
+static int omfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, omfs_get_block, wbc);
}
@@ -66,7 +66,9 @@ static int orangefs_writepage_locked(struct page *page,
return ret;
}
-static int orangefs_writepage(struct page *page, struct writeback_control *wbc)
+static int orangefs_writepage(struct address_space *__mapping,
+ struct page *page,
+ struct writeback_control *wbc)
{
int ret;
ret = orangefs_writepage_locked(page, wbc);
@@ -2744,7 +2744,9 @@ static int reiserfs_readpage(struct file *f, struct address_space *__mapping,
return block_read_full_page(page, reiserfs_get_block);
}
-static int reiserfs_writepage(struct page *page, struct writeback_control *wbc)
+static int reiserfs_writepage(struct address_space *__mapping,
+ struct page *page,
+ struct writeback_control *wbc)
{
struct inode *inode = page->mapping->host;
reiserfs_wait_on_write_block(inode->i_sb);
@@ -451,7 +451,8 @@ int sysv_getattr(const struct path *path, struct kstat *stat,
return 0;
}
-static int sysv_writepage(struct page *page, struct writeback_control *wbc)
+static int sysv_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page,get_block,wbc);
}
@@ -1003,7 +1003,8 @@ static int do_writepage(struct page *page, int len)
* on the page lock and it would not write the truncated inode node to the
* journal before we have finished.
*/
-static int ubifs_writepage(struct page *page, struct writeback_control *wbc)
+static int ubifs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
struct inode *inode = page->mapping->host;
struct ubifs_info *c = inode->i_sb->s_fs_info;
@@ -68,7 +68,8 @@ static int udf_adinicb_readpage(struct file *file,
return 0;
}
-static int udf_adinicb_writepage(struct page *page,
+static int udf_adinicb_writepage(struct address_space *__mapping,
+ struct page *page,
struct writeback_control *wbc)
{
struct inode *inode = page->mapping->host;
@@ -179,7 +179,8 @@ static void udf_write_failed(struct address_space *mapping, loff_t to)
}
}
-static int udf_writepage(struct page *page, struct writeback_control *wbc)
+static int udf_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page, udf_get_block, wbc);
}
@@ -303,7 +304,7 @@ int udf_expand_file_adinicb(struct inode *inode)
/* from now on we have normal address_space methods */
inode->i_data.a_ops = &udf_aops;
up_write(&iinfo->i_data_sem);
- err = inode->i_data.a_ops->writepage(page, &udf_wbc);
+ err = inode->i_data.a_ops->writepage(MAPPING_NULL, page, &udf_wbc);
if (err) {
/* Restore everything back so that we don't lose data... */
lock_page(page);
@@ -467,7 +467,8 @@ static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buff
return 0;
}
-static int ufs_writepage(struct page *page, struct writeback_control *wbc)
+static int ufs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
return block_write_full_page(page,ufs_getfrag_block,wbc);
}
@@ -251,7 +251,8 @@ static struct vboxsf_handle *vboxsf_get_write_handle(struct vboxsf_inode *sf_i)
return sf_handle;
}
-static int vboxsf_writepage(struct page *page, struct writeback_control *wbc)
+static int vboxsf_writepage(struct address_space *__mapping,
+ struct page *page, struct writeback_control *wbc)
{
struct inode *inode = page->mapping->host;
struct vboxsf_inode *sf_i = VBOXSF_I(inode);
@@ -559,7 +559,7 @@ static const struct iomap_writeback_ops xfs_writeback_ops = {
STATIC int
xfs_vm_writepage(
- struct page *page,
+ struct address_space *__mapping, struct page *page,
struct writeback_control *wbc)
{
struct xfs_writepage_ctx wpc = { };
@@ -112,7 +112,8 @@ static const struct iomap_writeback_ops zonefs_writeback_ops = {
.map_blocks = zonefs_map_blocks,
};
-static int zonefs_writepage(struct page *page, struct writeback_control *wbc)
+static int zonefs_writepage(struct address_space *__mapping,
+ struct page *page, struct writeback_control *wbc)
{
struct iomap_writepage_ctx wpc = { };
@@ -370,7 +370,8 @@ typedef int (*read_actor_t)(read_descriptor_t *, struct page *,
unsigned long, unsigned long);
struct address_space_operations {
- int (*writepage)(struct page *page, struct writeback_control *wbc);
+ int (*writepage)(struct address_space *, struct page *page,
+ struct writeback_control *wbc);
int (*readpage)(struct file *, struct address_space *, struct page *);
/* Write back some dirty pages from this mapping. */
@@ -536,7 +536,8 @@ extern void nfs_complete_unlink(struct dentry *dentry, struct inode *);
* linux/fs/nfs/write.c
*/
extern int nfs_congestion_kb;
-extern int nfs_writepage(struct page *page, struct writeback_control *wbc);
+extern int nfs_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc);
extern int nfs_writepages(struct address_space *, struct writeback_control *);
extern int nfs_flush_incompatible(struct file *file, struct page *page);
extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
@@ -392,7 +392,8 @@ extern void kswapd_stop(int nid);
/* linux/mm/page_io.c */
extern int swap_readpage(struct page *page, bool do_poll);
-extern int swap_writepage(struct page *page, struct writeback_control *wbc);
+extern int swap_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc);
extern void end_swap_bio_write(struct bio *bio);
extern int __swap_writepage(struct page *page, struct writeback_control *wbc,
bio_end_io_t end_write_func);
@@ -557,7 +558,9 @@ static inline struct page *swapin_readahead(swp_entry_t swp, gfp_t gfp_mask,
return NULL;
}
-static inline int swap_writepage(struct page *p, struct writeback_control *wbc)
+static inline int swap_writepage(struct address_space *__mapping,
+ struct page *p,
+ struct writeback_control *wbc)
{
return 0;
}
@@ -890,7 +890,7 @@ static int writeout(struct address_space *mapping, struct page *page)
*/
remove_migration_ptes(page, page, false);
- rc = mapping->a_ops->writepage(page, &wbc);
+ rc = mapping->a_ops->writepage(MAPPING_NULL, page, &wbc);
if (rc != AOP_WRITEPAGE_ACTIVATE)
/* unlocked. Relock */
@@ -2308,7 +2308,7 @@ static int __writepage(struct page *page, struct writeback_control *wbc,
void *data)
{
struct address_space *mapping = data;
- int ret = mapping->a_ops->writepage(page, wbc);
+ int ret = mapping->a_ops->writepage(MAPPING_NULL, page, wbc);
mapping_set_error(mapping, ret);
return ret;
}
@@ -2386,7 +2386,7 @@ int write_one_page(struct page *page)
if (clear_page_dirty_for_io(page)) {
get_page(page);
- ret = mapping->a_ops->writepage(page, &wbc);
+ ret = mapping->a_ops->writepage(MAPPING_NULL, page, &wbc);
if (ret == 0)
wait_on_page_writeback(page);
put_page(page);
@@ -244,7 +244,8 @@ int generic_swapfile_activate(struct swap_info_struct *sis,
* We may have stale swap cache pages in memory: notice
* them here and get rid of the unnecessary final write.
*/
-int swap_writepage(struct page *page, struct writeback_control *wbc)
+int swap_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
int ret = 0;
@@ -1356,7 +1356,8 @@ int shmem_unuse(unsigned int type, bool frontswap,
/*
* Move the page from the page cache to the swap cache.
*/
-static int shmem_writepage(struct page *page, struct writeback_control *wbc)
+static int shmem_writepage(struct address_space *__mapping, struct page *page,
+ struct writeback_control *wbc)
{
struct shmem_inode_info *info;
struct address_space *mapping;
@@ -1448,7 +1449,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
mutex_unlock(&shmem_swaplist_mutex);
BUG_ON(page_mapped(page));
- swap_writepage(page, wbc);
+ swap_writepage(MAPPING_NULL, page, wbc);
return 0;
}
@@ -825,7 +825,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping)
};
SetPageReclaim(page);
- res = mapping->a_ops->writepage(page, &wbc);
+ res = mapping->a_ops->writepage(MAPPING_NULL, page, &wbc);
if (res < 0)
handle_write_error(mapping, page, res);
if (res == AOP_WRITEPAGE_ACTIVATE) {