fs: Remove aop flags parameter from grab_cache_page_write_begin()

There are no more aop flags left, so remove the parameter.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent be3bbbc5
...@@ -670,7 +670,7 @@ static int affs_write_begin_ofs(struct file *file, struct address_space *mapping ...@@ -670,7 +670,7 @@ static int affs_write_begin_ofs(struct file *file, struct address_space *mapping
} }
index = pos >> PAGE_SHIFT; index = pos >> PAGE_SHIFT;
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
*pagep = page; *pagep = page;
......
...@@ -2110,7 +2110,7 @@ int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, ...@@ -2110,7 +2110,7 @@ int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len,
struct page *page; struct page *page;
int status; int status;
page = grab_cache_page_write_begin(mapping, index, 0); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
...@@ -2591,7 +2591,7 @@ int nobh_write_begin(struct address_space *mapping, ...@@ -2591,7 +2591,7 @@ int nobh_write_begin(struct address_space *mapping,
from = pos & (PAGE_SIZE - 1); from = pos & (PAGE_SIZE - 1);
to = from + len; to = from + len;
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
*pagep = page; *pagep = page;
......
...@@ -4695,7 +4695,7 @@ static int cifs_write_begin(struct file *file, struct address_space *mapping, ...@@ -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); cifs_dbg(FYI, "write_begin from %lld len %d\n", (long long)pos, len);
start: start:
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) { if (!page) {
rc = -ENOMEM; rc = -ENOMEM;
goto out; goto out;
......
...@@ -272,7 +272,7 @@ static int ecryptfs_write_begin(struct file *file, ...@@ -272,7 +272,7 @@ static int ecryptfs_write_begin(struct file *file,
loff_t prev_page_end_size; loff_t prev_page_end_size;
int rc = 0; int rc = 0;
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
*pagep = page; *pagep = page;
......
...@@ -563,7 +563,7 @@ static int ext4_convert_inline_data_to_extent(struct address_space *mapping, ...@@ -563,7 +563,7 @@ static int ext4_convert_inline_data_to_extent(struct address_space *mapping,
/* We cannot recurse into the filesystem as the transaction is already /* We cannot recurse into the filesystem as the transaction is already
* started */ * started */
flags = memalloc_nofs_save(); 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); memalloc_nofs_restore(flags);
if (!page) { if (!page) {
ret = -ENOMEM; ret = -ENOMEM;
...@@ -692,7 +692,7 @@ int ext4_try_to_write_inline_data(struct address_space *mapping, ...@@ -692,7 +692,7 @@ int ext4_try_to_write_inline_data(struct address_space *mapping,
goto out; goto out;
flags = memalloc_nofs_save(); 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); memalloc_nofs_restore(flags);
if (!page) { if (!page) {
ret = -ENOMEM; ret = -ENOMEM;
...@@ -852,7 +852,7 @@ static int ext4_da_convert_inline_data_to_extent(struct address_space *mapping, ...@@ -852,7 +852,7 @@ static int ext4_da_convert_inline_data_to_extent(struct address_space *mapping,
int ret = 0, inline_size; int ret = 0, inline_size;
struct page *page; struct page *page;
page = grab_cache_page_write_begin(mapping, 0, 0); page = grab_cache_page_write_begin(mapping, 0);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
...@@ -946,7 +946,7 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping, ...@@ -946,7 +946,7 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping,
* is already started. * is already started.
*/ */
flags = memalloc_nofs_save(); 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); memalloc_nofs_restore(flags);
if (!page) { if (!page) {
ret = -ENOMEM; ret = -ENOMEM;
......
...@@ -1171,7 +1171,7 @@ static int ext4_write_begin(struct file *file, struct address_space *mapping, ...@@ -1171,7 +1171,7 @@ static int ext4_write_begin(struct file *file, struct address_space *mapping,
* the page (if needed) without using GFP_NOFS. * the page (if needed) without using GFP_NOFS.
*/ */
retry_grab: retry_grab:
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
unlock_page(page); unlock_page(page);
...@@ -2963,7 +2963,7 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping, ...@@ -2963,7 +2963,7 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
} }
retry: retry:
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
......
...@@ -141,13 +141,13 @@ mext_page_double_lock(struct inode *inode1, struct inode *inode2, ...@@ -141,13 +141,13 @@ mext_page_double_lock(struct inode *inode1, struct inode *inode2,
} }
flags = memalloc_nofs_save(); 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]) { if (!page[0]) {
memalloc_nofs_restore(flags); memalloc_nofs_restore(flags);
return -ENOMEM; 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); memalloc_nofs_restore(flags);
if (!page[1]) { if (!page[1]) {
unlock_page(page[0]); unlock_page(page[0]);
......
...@@ -2677,7 +2677,7 @@ static inline struct page *f2fs_grab_cache_page(struct address_space *mapping, ...@@ -2677,7 +2677,7 @@ static inline struct page *f2fs_grab_cache_page(struct address_space *mapping,
return grab_cache_page(mapping, index); return grab_cache_page(mapping, index);
flags = memalloc_nofs_save(); 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); memalloc_nofs_restore(flags);
return page; return page;
......
...@@ -1174,7 +1174,7 @@ static ssize_t fuse_fill_write_pages(struct fuse_io_args *ia, ...@@ -1174,7 +1174,7 @@ static ssize_t fuse_fill_write_pages(struct fuse_io_args *ia,
break; break;
err = -ENOMEM; err = -ENOMEM;
page = grab_cache_page_write_begin(mapping, index, 0); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
break; break;
...@@ -2284,7 +2284,7 @@ static int fuse_write_begin(struct file *file, struct address_space *mapping, ...@@ -2284,7 +2284,7 @@ static int fuse_write_begin(struct file *file, struct address_space *mapping,
WARN_ON(!fc->writeback_cache); WARN_ON(!fc->writeback_cache);
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
goto error; goto error;
......
...@@ -468,7 +468,7 @@ static int hostfs_write_begin(struct file *file, struct address_space *mapping, ...@@ -468,7 +468,7 @@ static int hostfs_write_begin(struct file *file, struct address_space *mapping,
{ {
pgoff_t index = pos >> PAGE_SHIFT; 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) if (!*pagep)
return -ENOMEM; return -ENOMEM;
return 0; return 0;
......
...@@ -213,7 +213,7 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping, ...@@ -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. * page in read_cache_page(), which causes a deadlock.
*/ */
mutex_lock(&c->alloc_sem); mutex_lock(&c->alloc_sem);
pg = grab_cache_page_write_begin(mapping, index, flags); pg = grab_cache_page_write_begin(mapping, index);
if (!pg) { if (!pg) {
ret = -ENOMEM; ret = -ENOMEM;
goto release_sem; goto release_sem;
......
...@@ -557,7 +557,7 @@ int simple_write_begin(struct file *file, struct address_space *mapping, ...@@ -557,7 +557,7 @@ int simple_write_begin(struct file *file, struct address_space *mapping,
index = pos >> PAGE_SHIFT; index = pos >> PAGE_SHIFT;
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
......
...@@ -325,7 +325,7 @@ static int nfs_write_begin(struct file *file, struct address_space *mapping, ...@@ -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); file, mapping->host->i_ino, len, (long long) pos);
start: start:
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
*pagep = page; *pagep = page;
......
...@@ -872,7 +872,7 @@ static int ntfs_write_begin(struct file *file, struct address_space *mapping, ...@@ -872,7 +872,7 @@ static int ntfs_write_begin(struct file *file, struct address_space *mapping,
*pagep = NULL; *pagep = NULL;
if (is_resident(ni)) { if (is_resident(ni)) {
struct page *page = grab_cache_page_write_begin( struct page *page = grab_cache_page_write_begin(
mapping, pos >> PAGE_SHIFT, flags); mapping, pos >> PAGE_SHIFT);
if (!page) { if (!page) {
err = -ENOMEM; err = -ENOMEM;
......
...@@ -338,7 +338,7 @@ static int orangefs_write_begin(struct file *file, ...@@ -338,7 +338,7 @@ static int orangefs_write_begin(struct file *file,
index = pos >> PAGE_SHIFT; index = pos >> PAGE_SHIFT;
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
......
...@@ -2764,7 +2764,7 @@ static int reiserfs_write_begin(struct file *file, ...@@ -2764,7 +2764,7 @@ static int reiserfs_write_begin(struct file *file,
inode = mapping->host; inode = mapping->host;
index = pos >> PAGE_SHIFT; index = pos >> PAGE_SHIFT;
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
*pagep = page; *pagep = page;
......
...@@ -244,7 +244,7 @@ static int write_begin_slow(struct address_space *mapping, ...@@ -244,7 +244,7 @@ static int write_begin_slow(struct address_space *mapping,
if (unlikely(err)) if (unlikely(err))
return err; return err;
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index);
if (unlikely(!page)) { if (unlikely(!page)) {
ubifs_release_budget(c, &req); ubifs_release_budget(c, &req);
return -ENOMEM; return -ENOMEM;
...@@ -437,7 +437,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping, ...@@ -437,7 +437,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
return -EROFS; return -EROFS;
/* Try out the fast-path part first */ /* 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)) if (unlikely(!page))
return -ENOMEM; return -ENOMEM;
......
...@@ -94,7 +94,7 @@ static int udf_adinicb_write_begin(struct file *file, ...@@ -94,7 +94,7 @@ static int udf_adinicb_write_begin(struct file *file,
if (WARN_ON_ONCE(pos >= PAGE_SIZE)) if (WARN_ON_ONCE(pos >= PAGE_SIZE))
return -EIO; return -EIO;
page = grab_cache_page_write_begin(mapping, 0, flags); page = grab_cache_page_write_begin(mapping, 0);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
*pagep = page; *pagep = page;
......
...@@ -735,7 +735,7 @@ static inline unsigned find_get_pages_tag(struct address_space *mapping, ...@@ -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, 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. * Returns locked page at given index in given cache, creating it if needed.
......
...@@ -131,7 +131,7 @@ struct page *pagecache_get_page(struct address_space *mapping, pgoff_t index, ...@@ -131,7 +131,7 @@ struct page *pagecache_get_page(struct address_space *mapping, pgoff_t index,
EXPORT_SYMBOL(pagecache_get_page); EXPORT_SYMBOL(pagecache_get_page);
struct page *grab_cache_page_write_begin(struct address_space *mapping, 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; unsigned fgp_flags = FGP_LOCK | FGP_WRITE | FGP_CREAT | FGP_STABLE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment