fs: Remove aop flags parameter from grab_cache_page_write_begin()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 22 Feb 2022 16:25:12 +0000 (11:25 -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>
20 files changed:
fs/affs/file.c
fs/buffer.c
fs/cifs/file.c
fs/ecryptfs/mmap.c
fs/ext4/inline.c
fs/ext4/inode.c
fs/ext4/move_extent.c
fs/f2fs/f2fs.h
fs/fuse/file.c
fs/hostfs/hostfs_kern.c
fs/jffs2/file.c
fs/libfs.c
fs/nfs/file.c
fs/ntfs3/inode.c
fs/orangefs/inode.c
fs/reiserfs/inode.c
fs/ubifs/file.c
fs/udf/file.c
include/linux/pagemap.h
mm/folio-compat.c

index 704911d6aeba3176cc43afb1f33e507e623e47fe..06645d05c7173bd40672f6035a6207517cc36174 100644 (file)
@@ -670,7 +670,7 @@ static int affs_write_begin_ofs(struct file *file, struct address_space *mapping
        }
 
        index = pos >> PAGE_SHIFT;
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                return -ENOMEM;
        *pagep = page;
index fb97646d197747cf5eec34d8fa9ed0ff9b3835e8..01630218c75f6c83132bc441ada99f34d04b9445 100644 (file)
@@ -2110,7 +2110,7 @@ int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len,
        struct page *page;
        int status;
 
-       page = grab_cache_page_write_begin(mapping, index, 0);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                return -ENOMEM;
 
@@ -2591,7 +2591,7 @@ int nobh_write_begin(struct address_space *mapping,
        from = pos & (PAGE_SIZE - 1);
        to = from + len;
 
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                return -ENOMEM;
        *pagep = page;
index d511a78383c38ec7ce681fc74d2c4800f7b908ad..91aeae7fced8bce251c08a94f269d54ea26b0683 100644 (file)
@@ -4695,7 +4695,7 @@ static int cifs_write_begin(struct file *file, struct address_space *mapping,
        cifs_dbg(FYI, "write_begin from %lld len %d\n", (long long)pos, len);
 
 start:
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page) {
                rc = -ENOMEM;
                goto out;
index 9ad61b582f077111792e162040fc9f0f1c77beed..84e399a921ad5c4157230592d293489454a46135 100644 (file)
@@ -272,7 +272,7 @@ static int ecryptfs_write_begin(struct file *file,
        loff_t prev_page_end_size;
        int rc = 0;
 
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                return -ENOMEM;
        *pagep = page;
index b2ef5ba568bca9a91bc524888645461fa31af548..6d253edebf9fc44e541833c7120bc98d91e8864c 100644 (file)
@@ -563,7 +563,7 @@ retry:
        /* We cannot recurse into the filesystem as the transaction is already
         * started */
        flags = memalloc_nofs_save();
-       page = grab_cache_page_write_begin(mapping, 0, 0);
+       page = grab_cache_page_write_begin(mapping, 0);
        memalloc_nofs_restore(flags);
        if (!page) {
                ret = -ENOMEM;
@@ -692,7 +692,7 @@ int ext4_try_to_write_inline_data(struct address_space *mapping,
                goto out;
 
        flags = memalloc_nofs_save();
-       page = grab_cache_page_write_begin(mapping, 0, 0);
+       page = grab_cache_page_write_begin(mapping, 0);
        memalloc_nofs_restore(flags);
        if (!page) {
                ret = -ENOMEM;
@@ -852,7 +852,7 @@ static int ext4_da_convert_inline_data_to_extent(struct address_space *mapping,
        int ret = 0, inline_size;
        struct page *page;
 
-       page = grab_cache_page_write_begin(mapping, 0, 0);
+       page = grab_cache_page_write_begin(mapping, 0);
        if (!page)
                return -ENOMEM;
 
@@ -946,7 +946,7 @@ retry_journal:
         * is already started.
         */
        flags = memalloc_nofs_save();
-       page = grab_cache_page_write_begin(mapping, 0, 0);
+       page = grab_cache_page_write_begin(mapping, 0);
        memalloc_nofs_restore(flags);
        if (!page) {
                ret = -ENOMEM;
index 01a55647c959c3d20c8c0e0468be0c9ad71f34fa..512d8143c7650a71542f6304f29aecbb94442332 100644 (file)
@@ -1171,7 +1171,7 @@ static int ext4_write_begin(struct file *file, struct address_space *mapping,
         * the page (if needed) without using GFP_NOFS.
         */
 retry_grab:
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                return -ENOMEM;
        unlock_page(page);
@@ -2963,7 +2963,7 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
        }
 
 retry:
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                return -ENOMEM;
 
index 56f21272fb00171f6d1c8858b8cadc32660cf3ba..4172a7d224711bafdf43f2f4143c2e6437001769 100644 (file)
@@ -141,13 +141,13 @@ mext_page_double_lock(struct inode *inode1, struct inode *inode2,
        }
 
        flags = memalloc_nofs_save();
-       page[0] = grab_cache_page_write_begin(mapping[0], index1, 0);
+       page[0] = grab_cache_page_write_begin(mapping[0], index1);
        if (!page[0]) {
                memalloc_nofs_restore(flags);
                return -ENOMEM;
        }
 
-       page[1] = grab_cache_page_write_begin(mapping[1], index2, 0);
+       page[1] = grab_cache_page_write_begin(mapping[1], index2);
        memalloc_nofs_restore(flags);
        if (!page[1]) {
                unlock_page(page[0]);
index 74929ade4b5e5b86692be1318f0d3441b87e2349..18df53ef3d7e56cb4d2652d8d980628121558e40 100644 (file)
@@ -2677,7 +2677,7 @@ static inline struct page *f2fs_grab_cache_page(struct address_space *mapping,
                return grab_cache_page(mapping, index);
 
        flags = memalloc_nofs_save();
-       page = grab_cache_page_write_begin(mapping, index, 0);
+       page = grab_cache_page_write_begin(mapping, index);
        memalloc_nofs_restore(flags);
 
        return page;
index f18d14d5fea1996b02393d04758612469117d704..e35e394264adb74224e3dc8ac7d73d204c9a1e83 100644 (file)
@@ -1174,7 +1174,7 @@ static ssize_t fuse_fill_write_pages(struct fuse_io_args *ia,
                        break;
 
                err = -ENOMEM;
-               page = grab_cache_page_write_begin(mapping, index, 0);
+               page = grab_cache_page_write_begin(mapping, index);
                if (!page)
                        break;
 
@@ -2284,7 +2284,7 @@ static int fuse_write_begin(struct file *file, struct address_space *mapping,
 
        WARN_ON(!fc->writeback_cache);
 
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                goto error;
 
index 14f9ac973a2ef29278768e272f90f9f49809a773..2bfd316e1bf179a5524d205ff149253db81a06c3 100644 (file)
@@ -468,7 +468,7 @@ static int hostfs_write_begin(struct file *file, struct address_space *mapping,
 {
        pgoff_t index = pos >> PAGE_SHIFT;
 
-       *pagep = grab_cache_page_write_begin(mapping, index, flags);
+       *pagep = grab_cache_page_write_begin(mapping, index);
        if (!*pagep)
                return -ENOMEM;
        return 0;
index bd7d58d27bfc63574918095b14f14fcf13cf1b7c..142d3ba9f0a8941522e8599e46fe27206eeea505 100644 (file)
@@ -213,7 +213,7 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
         * page in read_cache_page(), which causes a deadlock.
         */
        mutex_lock(&c->alloc_sem);
-       pg = grab_cache_page_write_begin(mapping, index, flags);
+       pg = grab_cache_page_write_begin(mapping, index);
        if (!pg) {
                ret = -ENOMEM;
                goto release_sem;
index e64bdedef16835de44b0182a2c390d477a701b3e..d4395e1c669679a268c54ecddfadc8f3c0381eb3 100644 (file)
@@ -557,7 +557,7 @@ int simple_write_begin(struct file *file, struct address_space *mapping,
 
        index = pos >> PAGE_SHIFT;
 
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                return -ENOMEM;
 
index 150b7fa8f0a73637c7291a174172e1b2ffa8c3c4..d66088dd33e7b3d3d06099c40292bfcaebd7fdb7 100644 (file)
@@ -325,7 +325,7 @@ static int nfs_write_begin(struct file *file, struct address_space *mapping,
                file, mapping->host->i_ino, len, (long long) pos);
 
 start:
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                return -ENOMEM;
        *pagep = page;
index 3914138fd8bafdd06d18a8c84f619bf8afc1b7c6..16466c8648f3ff0304f5d6d46e0086980e277e29 100644 (file)
@@ -872,7 +872,7 @@ static int ntfs_write_begin(struct file *file, struct address_space *mapping,
        *pagep = NULL;
        if (is_resident(ni)) {
                struct page *page = grab_cache_page_write_begin(
-                       mapping, pos >> PAGE_SHIFT, flags);
+                       mapping, pos >> PAGE_SHIFT);
 
                if (!page) {
                        err = -ENOMEM;
index 79c1025d18ea9432b5ac5f6bbcc7f5162145bf2a..809690db8be285f0a6b435e92b6e60932e6de40b 100644 (file)
@@ -338,7 +338,7 @@ static int orangefs_write_begin(struct file *file,
 
        index = pos >> PAGE_SHIFT;
 
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                return -ENOMEM;
 
index 36c59b25486c8726c496629b487ab07b4bc8701b..aa31cf1dbba62fb542ef064a187496bef95e966e 100644 (file)
@@ -2764,7 +2764,7 @@ static int reiserfs_write_begin(struct file *file,
 
        inode = mapping->host;
        index = pos >> PAGE_SHIFT;
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (!page)
                return -ENOMEM;
        *pagep = page;
index 0383fbdc95ff1d2f199897221215db7a0f2ef97d..0911fc311434f37856cd49faa0e10f739a83cbda 100644 (file)
@@ -244,7 +244,7 @@ static int write_begin_slow(struct address_space *mapping,
        if (unlikely(err))
                return err;
 
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (unlikely(!page)) {
                ubifs_release_budget(c, &req);
                return -ENOMEM;
@@ -437,7 +437,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
                return -EROFS;
 
        /* Try out the fast-path part first */
-       page = grab_cache_page_write_begin(mapping, index, flags);
+       page = grab_cache_page_write_begin(mapping, index);
        if (unlikely(!page))
                return -ENOMEM;
 
index 0f6bf2504437ba2ee5cb56d41888c3ba508365b5..724bb3141fda41a319a89dc8d448c06e6d4148cc 100644 (file)
@@ -94,7 +94,7 @@ static int udf_adinicb_write_begin(struct file *file,
 
        if (WARN_ON_ONCE(pos >= PAGE_SIZE))
                return -EIO;
-       page = grab_cache_page_write_begin(mapping, 0, flags);
+       page = grab_cache_page_write_begin(mapping, 0);
        if (!page)
                return -ENOMEM;
        *pagep = page;
index 993994cd943a0db8a84b374cbfd791e5a61c0dd8..65ae8f96554b9a9bf5971c48e59e6c173223e169 100644 (file)
@@ -735,7 +735,7 @@ static inline unsigned find_get_pages_tag(struct address_space *mapping,
 }
 
 struct page *grab_cache_page_write_begin(struct address_space *mapping,
-                       pgoff_t index, unsigned flags);
+                       pgoff_t index);
 
 /*
  * Returns locked page at given index in given cache, creating it if needed.
index 3e42ddb819180645ea69408f5416edbb6cf584ea..20bc15b57d93e2587ccd9afccd6d9c33325cfb25 100644 (file)
@@ -131,7 +131,7 @@ struct page *pagecache_get_page(struct address_space *mapping, pgoff_t index,
 EXPORT_SYMBOL(pagecache_get_page);
 
 struct page *grab_cache_page_write_begin(struct address_space *mapping,
-                                       pgoff_t index, unsigned flags)
+                                       pgoff_t index)
 {
        unsigned fgp_flags = FGP_LOCK | FGP_WRITE | FGP_CREAT | FGP_STABLE;