fs: Remove flags parameter from aops->write_begin
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 22 Feb 2022 19:31:43 +0000 (14:31 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 8 May 2022 18:28:19 +0000 (14:28 -0400)
There are no more aop flags left, so remove the parameter.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
45 files changed:
Documentation/filesystems/locking.rst
Documentation/filesystems/vfs.rst
block/fops.c
fs/9p/vfs_addr.c
fs/adfs/inode.c
fs/affs/file.c
fs/afs/internal.h
fs/afs/write.c
fs/bfs/file.c
fs/ceph/addr.c
fs/cifs/file.c
fs/ecryptfs/mmap.c
fs/exfat/inode.c
fs/ext2/inode.c
fs/ext4/inode.c
fs/f2fs/data.c
fs/f2fs/super.c
fs/fat/inode.c
fs/fuse/file.c
fs/hfs/inode.c
fs/hfsplus/inode.c
fs/hostfs/hostfs_kern.c
fs/hpfs/file.c
fs/hugetlbfs/inode.c
fs/jffs2/file.c
fs/jfs/inode.c
fs/libfs.c
fs/minix/inode.c
fs/nfs/file.c
fs/nilfs2/inode.c
fs/ntfs3/inode.c
fs/ocfs2/aops.c
fs/omfs/file.c
fs/orangefs/inode.c
fs/reiserfs/inode.c
fs/sysv/itree.c
fs/ubifs/file.c
fs/udf/file.c
fs/udf/inode.c
fs/ufs/inode.c
include/linux/fs.h
include/trace/events/ext4.h
include/trace/events/f2fs.h
mm/filemap.c
mm/shmem.c

index c26d854275a0ec399c610af4d356d0a9d9ef0e21..fd9d9caf09ab0f1c76f6331c9af5c9e6f4610602 100644 (file)
@@ -242,7 +242,7 @@ prototypes::
        bool (*dirty_folio)(struct address_space *, struct folio *folio);
        void (*readahead)(struct readahead_control *);
        int (*write_begin)(struct file *, struct address_space *mapping,
-                               loff_t pos, unsigned len, unsigned flags,
+                               loff_t pos, unsigned len,
                                struct page **pagep, void **fsdata);
        int (*write_end)(struct file *, struct address_space *mapping,
                                loff_t pos, unsigned len, unsigned copied,
index 794bd1a66bfbdfed8e4b95c003ac7a6a90de1b9e..30f303180a7d69c27352da1a280a405cd69a6f38 100644 (file)
@@ -727,7 +727,7 @@ cache in your filesystem.  The following members are defined:
                bool (*dirty_folio)(struct address_space *, struct folio *);
                void (*readahead)(struct readahead_control *);
                int (*write_begin)(struct file *, struct address_space *mapping,
-                                  loff_t pos, unsigned len, unsigned flags,
+                                  loff_t pos, unsigned len,
                                struct page **pagep, void **fsdata);
                int (*write_end)(struct file *, struct address_space *mapping,
                                 loff_t pos, unsigned len, unsigned copied,
@@ -832,9 +832,6 @@ cache in your filesystem.  The following members are defined:
        passed to write_begin is greater than the number of bytes copied
        into the page).
 
-       flags is a field for AOP_FLAG_xxx flags, described in
-       include/linux/fs.h.
-
        A void * may be returned in fsdata, which then gets passed into
        write_end.
 
index b432756570c6f11bcf0e7d2cc510459c39cf1fe8..712affe56e29159a02ad87c884ff0e0f5a8edf69 100644 (file)
@@ -398,8 +398,7 @@ static void blkdev_readahead(struct readahead_control *rac)
 }
 
 static int blkdev_write_begin(struct file *file, struct address_space *mapping,
-               loff_t pos, unsigned len, unsigned flags, struct page **pagep,
-               void **fsdata)
+               loff_t pos, unsigned len, struct page **pagep, void **fsdata)
 {
        return block_write_begin(mapping, pos, len, pagep, blkdev_get_block);
 }
index d311e68e21fdc8cbc08987a9797e95698d005aa1..a2d57112f53ec24d9d578b474520e251adc67276 100644 (file)
@@ -260,7 +260,7 @@ v9fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
 }
 
 static int v9fs_write_begin(struct file *filp, struct address_space *mapping,
-                           loff_t pos, unsigned int len, unsigned int flags,
+                           loff_t pos, unsigned int len,
                            struct page **subpagep, void **fsdata)
 {
        int retval;
index b6912496bb19a88ee7ac37e528bfad24effbf7db..f7959b1a2d52448e0ab2a747c2d2ad05df670994 100644 (file)
@@ -52,7 +52,7 @@ static void adfs_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int adfs_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index 06645d05c7173bd40672f6035a6207517cc36174..b952f65c3f0665a6a201f52a6e87a49d5038e858 100644 (file)
@@ -414,7 +414,7 @@ affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
 }
 
 static int affs_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
@@ -650,7 +650,7 @@ affs_readpage_ofs(struct file *file, struct page *page)
 }
 
 static int affs_write_begin_ofs(struct file *file, struct address_space *mapping,
-                               loff_t pos, unsigned len, unsigned flags,
+                               loff_t pos, unsigned len,
                                struct page **pagep, void **fsdata)
 {
        struct inode *inode = mapping->host;
@@ -887,7 +887,7 @@ affs_truncate(struct inode *inode)
                loff_t isize = inode->i_size;
                int res;
 
-               res = mapping->a_ops->write_begin(NULL, mapping, isize, 0, 0, &page, &fsdata);
+               res = mapping->a_ops->write_begin(NULL, mapping, isize, 0, &page, &fsdata);
                if (!res)
                        res = mapping->a_ops->write_end(NULL, mapping, isize, 0, 0, page, fsdata);
                else
index 7b7ef945dc78e460aa4580b16ab38bcd24cc90eb..7a72e9c60423a394cef27fc3b5079a2aa7fc5ce9 100644 (file)
@@ -1535,7 +1535,7 @@ bool afs_dirty_folio(struct address_space *, struct folio *);
 #define afs_dirty_folio filemap_dirty_folio
 #endif
 extern int afs_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata);
 extern int afs_write_end(struct file *file, struct address_space *mapping,
                        loff_t pos, unsigned len, unsigned copied,
index af496c98d394f8a37d16c484198edbc1e274dc12..5224e346fbad533f545129d7c6890b47ad9dc2ef 100644 (file)
@@ -42,7 +42,7 @@ static void afs_folio_start_fscache(bool caching, struct folio *folio)
  * prepare to perform part of a write to a page
  */
 int afs_write_begin(struct file *file, struct address_space *mapping,
-                   loff_t pos, unsigned len, unsigned flags,
+                   loff_t pos, unsigned len,
                    struct page **_page, void **fsdata)
 {
        struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
index 9408f45225cb89e742e745dfa0629493b85f8249..dc97c9b8f23b53a479a18efa15cfd95255be36a6 100644 (file)
@@ -169,7 +169,7 @@ static void bfs_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int bfs_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index 415f0886bc2533f8715adbcb3d46d2c7670429d2..e65541a51b688f7133efbe85f75cec8a44eb19de 100644 (file)
@@ -1311,7 +1311,7 @@ static int ceph_netfs_check_write_begin(struct file *file, loff_t pos, unsigned
  * clean, or already dirty within the same snap context.
  */
 static int ceph_write_begin(struct file *file, struct address_space *mapping,
-                           loff_t pos, unsigned len, unsigned aop_flags,
+                           loff_t pos, unsigned len,
                            struct page **pagep, void **fsdata)
 {
        struct inode *inode = file_inode(file);
index 91aeae7fced8bce251c08a94f269d54ea26b0683..da362b5a0c9604138bdd85f9c8f74c7d7c182c6e 100644 (file)
@@ -4681,7 +4681,7 @@ bool is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
 }
 
 static int cifs_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int oncethru = 0;
index 84e399a921ad5c4157230592d293489454a46135..47904d40ef88071297a78c5b446ebc2b13d84bef 100644 (file)
@@ -264,7 +264,7 @@ out:
  */
 static int ecryptfs_write_begin(struct file *file,
                        struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        pgoff_t index = pos >> PAGE_SHIFT;
index 8ed3c4b700cd0fd0ad19d0dbdf612fde72e893f6..b9f63113db2d64e01a677dd962e131187f98be1f 100644 (file)
@@ -389,7 +389,7 @@ static void exfat_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int exfat_write_begin(struct file *file, struct address_space *mapping,
-               loff_t pos, unsigned int len, unsigned int flags,
+               loff_t pos, unsigned int len,
                struct page **pagep, void **fsdata)
 {
        int ret;
index bfa69c52ce2c8dd97b05a547b0ac7348e08a31d6..d8ca8050945aa2dd48ca66b5698f9a2d1495a01c 100644 (file)
@@ -887,8 +887,7 @@ static void ext2_readahead(struct readahead_control *rac)
 
 static int
 ext2_write_begin(struct file *file, struct address_space *mapping,
-               loff_t pos, unsigned len, unsigned flags,
-               struct page **pagep, void **fsdata)
+               loff_t pos, unsigned len, struct page **pagep, void **fsdata)
 {
        int ret;
 
@@ -912,8 +911,7 @@ static int ext2_write_end(struct file *file, struct address_space *mapping,
 
 static int
 ext2_nobh_write_begin(struct file *file, struct address_space *mapping,
-               loff_t pos, unsigned len, unsigned flags,
-               struct page **pagep, void **fsdata)
+               loff_t pos, unsigned len, struct page **pagep, void **fsdata)
 {
        int ret;
 
index 512d8143c7650a71542f6304f29aecbb94442332..d3a7e8581291be7b74aaa26cee05a28815d3a6fc 100644 (file)
@@ -1130,7 +1130,7 @@ static int ext4_block_write_begin(struct page *page, loff_t pos, unsigned len,
 #endif
 
 static int ext4_write_begin(struct file *file, struct address_space *mapping,
-                           loff_t pos, unsigned len, unsigned flags,
+                           loff_t pos, unsigned len,
                            struct page **pagep, void **fsdata)
 {
        struct inode *inode = mapping->host;
@@ -1144,7 +1144,7 @@ static int ext4_write_begin(struct file *file, struct address_space *mapping,
        if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb))))
                return -EIO;
 
-       trace_ext4_write_begin(inode, pos, len, flags);
+       trace_ext4_write_begin(inode, pos, len);
        /*
         * Reserve one block more for addition to orphan list in case
         * we allocate blocks but write fails for some reason
@@ -2931,7 +2931,7 @@ static int ext4_nonda_switch(struct super_block *sb)
 }
 
 static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
-                              loff_t pos, unsigned len, unsigned flags,
+                              loff_t pos, unsigned len,
                               struct page **pagep, void **fsdata)
 {
        int ret, retries = 0;
@@ -2948,10 +2948,10 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
            ext4_verity_in_progress(inode)) {
                *fsdata = (void *)FALL_BACK_TO_NONDELALLOC;
                return ext4_write_begin(file, mapping, pos,
-                                       len, flags, pagep, fsdata);
+                                       len, pagep, fsdata);
        }
        *fsdata = (void *)0;
-       trace_ext4_da_write_begin(inode, pos, len, flags);
+       trace_ext4_da_write_begin(inode, pos, len);
 
        if (ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) {
                ret = ext4_da_write_inline_data_begin(mapping, inode, pos, len,
index 9a1a526f20920bb7dd24fca86724c4c4ecb19fb5..b3cf49136b9f6fcb379135d6157be85d7e48583c 100644 (file)
@@ -3314,8 +3314,7 @@ unlock_out:
 }
 
 static int f2fs_write_begin(struct file *file, struct address_space *mapping,
-               loff_t pos, unsigned len, unsigned flags,
-               struct page **pagep, void **fsdata)
+               loff_t pos, unsigned len, struct page **pagep, void **fsdata)
 {
        struct inode *inode = mapping->host;
        struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
@@ -3325,7 +3324,7 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping,
        block_t blkaddr = NULL_ADDR;
        int err = 0;
 
-       trace_f2fs_write_begin(inode, pos, len, flags);
+       trace_f2fs_write_begin(inode, pos, len);
 
        if (!f2fs_is_checkpoint_ready(sbi)) {
                err = -ENOSPC;
index 4368f90571bd6194a992ba0bed1b7a109dcee597..ed3e8b7a8260c2f16895d0b831365a6902475367 100644 (file)
@@ -2483,7 +2483,7 @@ static ssize_t f2fs_quota_write(struct super_block *sb, int type,
                tocopy = min_t(unsigned long, sb->s_blocksize - offset,
                                                                towrite);
 retry:
-               err = a_ops->write_begin(NULL, mapping, off, tocopy, 0,
+               err = a_ops->write_begin(NULL, mapping, off, tocopy,
                                                        &page, &fsdata);
                if (unlikely(err)) {
                        if (err == -ENOMEM) {
index 9b34ccef25012ba9763e467967a580fe85818328..1f15b0fd1bb0cc62710a57c1d9e31296a419cf8e 100644 (file)
@@ -226,7 +226,7 @@ static void fat_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int fat_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int err;
index e35e394264adb74224e3dc8ac7d73d204c9a1e83..bca8c2135ec53faaee4135af2ccd65a084995d27 100644 (file)
@@ -2273,8 +2273,7 @@ out:
  * but how to implement it without killing performance need more thinking.
  */
 static int fuse_write_begin(struct file *file, struct address_space *mapping,
-               loff_t pos, unsigned len, unsigned flags,
-               struct page **pagep, void **fsdata)
+               loff_t pos, unsigned len, struct page **pagep, void **fsdata)
 {
        pgoff_t index = pos >> PAGE_SHIFT;
        struct fuse_conn *fc = get_fuse_conn(file_inode(file));
index 396735dd3407fdfdff0ca616928b1d6422ed60ff..93d9aa8321399ca4bb29cd7fba43afb6cf61b6c3 100644 (file)
@@ -50,7 +50,7 @@ static void hfs_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int hfs_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index 435b6202532ae00c3bdcc78d5dcac883d2a31f1d..73010aa4623f817141f845a43fa5bfc48bd21300 100644 (file)
@@ -44,7 +44,7 @@ static void hfsplus_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int hfsplus_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index 2bfd316e1bf179a5524d205ff149253db81a06c3..e658d8edde35284763cc3671602d9d8248dc8fee 100644 (file)
@@ -463,7 +463,7 @@ static int hostfs_readpage(struct file *file, struct page *page)
 }
 
 static int hostfs_write_begin(struct file *file, struct address_space *mapping,
-                             loff_t pos, unsigned len, unsigned flags,
+                             loff_t pos, unsigned len,
                              struct page **pagep, void **fsdata)
 {
        pgoff_t index = pos >> PAGE_SHIFT;
index 8740b4ea0b52c50857577126728eac584965ebe9..8b590b3826c38e29ac878cf74db2cbad2692bdcd 100644 (file)
@@ -194,7 +194,7 @@ static void hpfs_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int hpfs_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index dd3a088db11d1e9b501f087bb3e87426b666312d..2de9ca5d260d543318fe9a49aa6a23f0f5dce503 100644 (file)
@@ -383,7 +383,7 @@ static ssize_t hugetlbfs_read_iter(struct kiocb *iocb, struct iov_iter *to)
 
 static int hugetlbfs_write_begin(struct file *file,
                        struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        return -EINVAL;
index 142d3ba9f0a8941522e8599e46fe27206eeea505..2b35811772de3c42d7fb5da0ed53de9f2b3726a4 100644 (file)
@@ -25,7 +25,7 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping,
                        loff_t pos, unsigned len, unsigned copied,
                        struct page *pg, void *fsdata);
 static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata);
 static int jffs2_readpage (struct file *filp, struct page *pg);
 
@@ -130,7 +130,7 @@ static int jffs2_readpage (struct file *filp, struct page *pg)
 }
 
 static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        struct page *pg;
index e16f77b4e84cb11ee5c091ea30d6d570a8b74637..aa9f112107b2056d33e5d99416ddc194120c5561 100644 (file)
@@ -314,7 +314,7 @@ static void jfs_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int jfs_write_begin(struct file *file, struct address_space *mapping,
-                               loff_t pos, unsigned len, unsigned flags,
+                               loff_t pos, unsigned len,
                                struct page **pagep, void **fsdata)
 {
        int ret;
index d4395e1c669679a268c54ecddfadc8f3c0381eb3..a1c10d3163e07ab3f1c58d21b6f6bd20d10522ec 100644 (file)
@@ -549,7 +549,7 @@ static int simple_readpage(struct file *file, struct page *page)
 }
 
 int simple_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        struct page *page;
index 5e8d7ba661cf4e1b78f13f50b8d8334a0d313e7f..3add78bccedc70eeec960a6c6955339e61bbeaff 100644 (file)
@@ -423,7 +423,7 @@ static void minix_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int minix_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index d66088dd33e7b3d3d06099c40292bfcaebd7fdb7..314d2d7ba84a36b43727fe29c294de2d50794e54 100644 (file)
@@ -313,7 +313,7 @@ static bool nfs_want_read_modify_write(struct file *file, struct page *page,
  * increment the page use counts until he is done with the page.
  */
 static int nfs_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index be09a0d10f04a84ba7b44b4738331afb04f3c806..02297ec8dc55ac9da38fff41f283f37c0f3f6a74 100644 (file)
@@ -248,7 +248,7 @@ void nilfs_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int nilfs_write_begin(struct file *file, struct address_space *mapping,
-                            loff_t pos, unsigned len, unsigned flags,
+                            loff_t pos, unsigned len,
                             struct page **pagep, void **fsdata)
 
 {
index 16466c8648f3ff0304f5d6d46e0086980e277e29..1364174cc6c93c3e3f05ef9fd163691035af271a 100644 (file)
@@ -862,7 +862,7 @@ static int ntfs_get_block_write_begin(struct inode *inode, sector_t vbn,
 }
 
 static int ntfs_write_begin(struct file *file, struct address_space *mapping,
-                           loff_t pos, u32 len, u32 flags, struct page **pagep,
+                           loff_t pos, u32 len, struct page **pagep,
                            void **fsdata)
 {
        int err;
index 4b9af65cb61bb946e6f06dfb074d8d1cd98e7e9d..7cffe9dcad177d56be11be96a5287dcce81790ca 100644 (file)
@@ -1881,7 +1881,7 @@ out:
 }
 
 static int ocfs2_write_begin(struct file *file, struct address_space *mapping,
-                            loff_t pos, unsigned len, unsigned flags,
+                            loff_t pos, unsigned len,
                             struct page **pagep, void **fsdata)
 {
        int ret;
index 349b96d89c448f5dcc79a85ba2248142463b33ac..980b0a72c17232992678cfcfb19a0447b5689a71 100644 (file)
@@ -316,7 +316,7 @@ static void omfs_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int omfs_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index 809690db8be285f0a6b435e92b6e60932e6de40b..bc7ccd15d7a38881479a7b7431e18ffac51b1fa3 100644 (file)
@@ -326,9 +326,8 @@ static int orangefs_readpage(struct file *file, struct page *page)
 }
 
 static int orangefs_write_begin(struct file *file,
-    struct address_space *mapping,
-    loff_t pos, unsigned len, unsigned flags, struct page **pagep,
-    void **fsdata)
+               struct address_space *mapping, loff_t pos, unsigned len,
+               struct page **pagep, void **fsdata)
 {
        struct orangefs_write_range *wr;
        struct folio *folio;
index aa31cf1dbba62fb542ef064a187496bef95e966e..46ba4892030a18b89b5888dae57e11aca758be5a 100644 (file)
@@ -2753,7 +2753,7 @@ static void reiserfs_truncate_failed_write(struct inode *inode)
 
 static int reiserfs_write_begin(struct file *file,
                                struct address_space *mapping,
-                               loff_t pos, unsigned len, unsigned flags,
+                               loff_t pos, unsigned len,
                                struct page **pagep, void **fsdata)
 {
        struct inode *inode;
index 96b7fd4facf3969dd83da9d3a8a0cc157e41f5b5..96ad24fe0ffb0c465adc3ebf717d3ea2b313393b 100644 (file)
@@ -477,7 +477,7 @@ static void sysv_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int sysv_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index 0911fc311434f37856cd49faa0e10f739a83cbda..81c085c4decf05b385d693f2755d0b336befccf5 100644 (file)
@@ -215,8 +215,7 @@ static void release_existing_page_budget(struct ubifs_info *c)
 }
 
 static int write_begin_slow(struct address_space *mapping,
-                           loff_t pos, unsigned len, struct page **pagep,
-                           unsigned flags)
+                           loff_t pos, unsigned len, struct page **pagep)
 {
        struct inode *inode = mapping->host;
        struct ubifs_info *c = inode->i_sb->s_fs_info;
@@ -419,7 +418,7 @@ static int allocate_budget(struct ubifs_info *c, struct page *page,
  * without forcing write-back. The slow path does not make this assumption.
  */
 static int ubifs_write_begin(struct file *file, struct address_space *mapping,
-                            loff_t pos, unsigned len, unsigned flags,
+                            loff_t pos, unsigned len,
                             struct page **pagep, void **fsdata)
 {
        struct inode *inode = mapping->host;
@@ -493,7 +492,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
                unlock_page(page);
                put_page(page);
 
-               return write_begin_slow(mapping, pos, len, pagep, flags);
+               return write_begin_slow(mapping, pos, len, pagep);
        }
 
        /*
index 724bb3141fda41a319a89dc8d448c06e6d4148cc..3f4d5c44c784975f69f0d763879f4c1ea7ed6f41 100644 (file)
@@ -87,7 +87,7 @@ static int udf_adinicb_writepage(struct page *page,
 
 static int udf_adinicb_write_begin(struct file *file,
                        struct address_space *mapping, loff_t pos,
-                       unsigned len, unsigned flags, struct page **pagep,
+                       unsigned len, struct page **pagep,
                        void **fsdata)
 {
        struct page *page;
index 88a95886ce8ae6db5086a7ad5a9604fbee982593..866f9a53248ec9eb4a685d64d3f9d2ad5ef6b669 100644 (file)
@@ -204,7 +204,7 @@ static void udf_readahead(struct readahead_control *rac)
 }
 
 static int udf_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index bd0e0c66f93d37274f5374c7c45ee5cda19c58d1..6c973b71cab240abdc95ef7bb124291a3adf96f5 100644 (file)
@@ -495,7 +495,7 @@ static void ufs_write_failed(struct address_space *mapping, loff_t to)
 }
 
 static int ufs_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        int ret;
index f81bc5cbcbb61c99396f95c159cf843542e7e83d..a0e73432526f150c2717f7c740b5bb93e79b3acc 100644 (file)
@@ -346,7 +346,7 @@ struct address_space_operations {
        void (*readahead)(struct readahead_control *);
 
        int (*write_begin)(struct file *, struct address_space *mapping,
-                               loff_t pos, unsigned len, unsigned flags,
+                               loff_t pos, unsigned len,
                                struct page **pagep, void **fsdata);
        int (*write_end)(struct file *, struct address_space *mapping,
                                loff_t pos, unsigned len, unsigned copied,
@@ -3179,7 +3179,7 @@ extern int noop_fsync(struct file *, loff_t, loff_t, int);
 extern ssize_t noop_direct_IO(struct kiocb *iocb, struct iov_iter *iter);
 extern int simple_empty(struct dentry *);
 extern int simple_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata);
 extern const struct address_space_operations ram_aops;
 extern int always_delete_dentry(const struct dentry *);
index d06ffffad43486c7886b1e4d1ebfc23eed69111a..229e8fae66a345aef3924e7aeab3868d1c33bfec 100644 (file)
@@ -335,17 +335,15 @@ TRACE_EVENT(ext4_begin_ordered_truncate,
 
 DECLARE_EVENT_CLASS(ext4__write_begin,
 
-       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
-                unsigned int flags),
+       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
 
-       TP_ARGS(inode, pos, len, flags),
+       TP_ARGS(inode, pos, len),
 
        TP_STRUCT__entry(
                __field(        dev_t,  dev                     )
                __field(        ino_t,  ino                     )
                __field(        loff_t, pos                     )
                __field(        unsigned int, len               )
-               __field(        unsigned int, flags             )
        ),
 
        TP_fast_assign(
@@ -353,29 +351,26 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
                __entry->ino    = inode->i_ino;
                __entry->pos    = pos;
                __entry->len    = len;
-               __entry->flags  = flags;
        ),
 
-       TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u",
+       TP_printk("dev %d,%d ino %lu pos %lld len %u",
                  MAJOR(__entry->dev), MINOR(__entry->dev),
                  (unsigned long) __entry->ino,
-                 __entry->pos, __entry->len, __entry->flags)
+                 __entry->pos, __entry->len)
 );
 
 DEFINE_EVENT(ext4__write_begin, ext4_write_begin,
 
-       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
-                unsigned int flags),
+       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
 
-       TP_ARGS(inode, pos, len, flags)
+       TP_ARGS(inode, pos, len)
 );
 
 DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin,
 
-       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
-                unsigned int flags),
+       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
 
-       TP_ARGS(inode, pos, len, flags)
+       TP_ARGS(inode, pos, len)
 );
 
 DECLARE_EVENT_CLASS(ext4__write_end,
index 1779e133cea0c1b18a68ca61f8694fe618767dfb..bea654a85e6ba8fbba2b5e435ab1b172899090c7 100644 (file)
@@ -1159,17 +1159,15 @@ DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_write_bio,
 
 TRACE_EVENT(f2fs_write_begin,
 
-       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
-                               unsigned int flags),
+       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
 
-       TP_ARGS(inode, pos, len, flags),
+       TP_ARGS(inode, pos, len),
 
        TP_STRUCT__entry(
                __field(dev_t,  dev)
                __field(ino_t,  ino)
                __field(loff_t, pos)
                __field(unsigned int, len)
-               __field(unsigned int, flags)
        ),
 
        TP_fast_assign(
@@ -1177,14 +1175,12 @@ TRACE_EVENT(f2fs_write_begin,
                __entry->ino    = inode->i_ino;
                __entry->pos    = pos;
                __entry->len    = len;
-               __entry->flags  = flags;
        ),
 
-       TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, flags = %u",
+       TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u",
                show_dev_ino(__entry),
                (unsigned long long)__entry->pos,
-               __entry->len,
-               __entry->flags)
+               __entry->len)
 );
 
 TRACE_EVENT(f2fs_write_end,
index 9a1eef6c5d350e6fadb77be23a48c34818d6310e..0751843b052fe44b89b4b912a42462663a5d1afd 100644 (file)
@@ -3628,8 +3628,7 @@ int pagecache_write_begin(struct file *file, struct address_space *mapping,
 {
        const struct address_space_operations *aops = mapping->a_ops;
 
-       return aops->write_begin(file, mapping, pos, len, flags,
-                                                       pagep, fsdata);
+       return aops->write_begin(file, mapping, pos, len, pagep, fsdata);
 }
 EXPORT_SYMBOL(pagecache_write_begin);
 
@@ -3754,7 +3753,6 @@ ssize_t generic_perform_write(struct kiocb *iocb, struct iov_iter *i)
        const struct address_space_operations *a_ops = mapping->a_ops;
        long status = 0;
        ssize_t written = 0;
-       unsigned int flags = 0;
 
        do {
                struct page *page;
@@ -3784,7 +3782,7 @@ again:
                        break;
                }
 
-               status = a_ops->write_begin(file, mapping, pos, bytes, flags,
+               status = a_ops->write_begin(file, mapping, pos, bytes,
                                                &page, &fsdata);
                if (unlikely(status < 0))
                        break;
index 4b2fea33158e8a33a87354ccefc574ef74c1e793..0f557a512171f7d843f69916a547b11a94303bab 100644 (file)
@@ -2426,7 +2426,7 @@ static int shmem_initxattrs(struct inode *, const struct xattr *, void *);
 
 static int
 shmem_write_begin(struct file *file, struct address_space *mapping,
-                       loff_t pos, unsigned len, unsigned flags,
+                       loff_t pos, unsigned len,
                        struct page **pagep, void **fsdata)
 {
        struct inode *inode = mapping->host;