fs: Remove aop flags parameter from block_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 de2a9311
...@@ -401,8 +401,7 @@ static int blkdev_write_begin(struct file *file, struct address_space *mapping, ...@@ -401,8 +401,7 @@ static int blkdev_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags, struct page **pagep, loff_t pos, unsigned len, unsigned flags, struct page **pagep,
void **fsdata) void **fsdata)
{ {
return block_write_begin(mapping, pos, len, flags, pagep, return block_write_begin(mapping, pos, len, pagep, blkdev_get_block);
blkdev_get_block);
} }
static int blkdev_write_end(struct file *file, struct address_space *mapping, static int blkdev_write_end(struct file *file, struct address_space *mapping,
......
...@@ -174,8 +174,7 @@ static int bfs_write_begin(struct file *file, struct address_space *mapping, ...@@ -174,8 +174,7 @@ static int bfs_write_begin(struct file *file, struct address_space *mapping,
{ {
int ret; int ret;
ret = block_write_begin(mapping, pos, len, flags, pagep, ret = block_write_begin(mapping, pos, len, pagep, bfs_get_block);
bfs_get_block);
if (unlikely(ret)) if (unlikely(ret))
bfs_write_failed(mapping, pos + len); bfs_write_failed(mapping, pos + len);
......
...@@ -2104,13 +2104,13 @@ static int __block_commit_write(struct inode *inode, struct page *page, ...@@ -2104,13 +2104,13 @@ static int __block_commit_write(struct inode *inode, struct page *page,
* The filesystem needs to handle block truncation upon failure. * The filesystem needs to handle block truncation upon failure.
*/ */
int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len,
unsigned flags, struct page **pagep, get_block_t *get_block) struct page **pagep, get_block_t *get_block)
{ {
pgoff_t index = pos >> PAGE_SHIFT; pgoff_t index = pos >> PAGE_SHIFT;
struct page *page; struct page *page;
int status; int status;
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index, 0);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
...@@ -2460,7 +2460,7 @@ int cont_write_begin(struct file *file, struct address_space *mapping, ...@@ -2460,7 +2460,7 @@ int cont_write_begin(struct file *file, struct address_space *mapping,
(*bytes)++; (*bytes)++;
} }
return block_write_begin(mapping, pos, len, flags, pagep, get_block); return block_write_begin(mapping, pos, len, pagep, get_block);
} }
EXPORT_SYMBOL(cont_write_begin); EXPORT_SYMBOL(cont_write_begin);
......
...@@ -892,8 +892,7 @@ ext2_write_begin(struct file *file, struct address_space *mapping, ...@@ -892,8 +892,7 @@ ext2_write_begin(struct file *file, struct address_space *mapping,
{ {
int ret; int ret;
ret = block_write_begin(mapping, pos, len, flags, pagep, ret = block_write_begin(mapping, pos, len, pagep, ext2_get_block);
ext2_get_block);
if (ret < 0) if (ret < 0)
ext2_write_failed(mapping, pos + len); ext2_write_failed(mapping, pos + len);
return ret; return ret;
......
...@@ -428,8 +428,7 @@ static int minix_write_begin(struct file *file, struct address_space *mapping, ...@@ -428,8 +428,7 @@ static int minix_write_begin(struct file *file, struct address_space *mapping,
{ {
int ret; int ret;
ret = block_write_begin(mapping, pos, len, flags, pagep, ret = block_write_begin(mapping, pos, len, pagep, minix_get_block);
minix_get_block);
if (unlikely(ret)) if (unlikely(ret))
minix_write_failed(mapping, pos + len); minix_write_failed(mapping, pos + len);
......
...@@ -258,8 +258,7 @@ static int nilfs_write_begin(struct file *file, struct address_space *mapping, ...@@ -258,8 +258,7 @@ static int nilfs_write_begin(struct file *file, struct address_space *mapping,
if (unlikely(err)) if (unlikely(err))
return err; return err;
err = block_write_begin(mapping, pos, len, flags, pagep, err = block_write_begin(mapping, pos, len, pagep, nilfs_get_block);
nilfs_get_block);
if (unlikely(err)) { if (unlikely(err)) {
nilfs_write_failed(mapping, pos + len); nilfs_write_failed(mapping, pos + len);
nilfs_transaction_abort(inode->i_sb); nilfs_transaction_abort(inode->i_sb);
......
...@@ -511,7 +511,7 @@ static int nilfs_recover_dsync_blocks(struct the_nilfs *nilfs, ...@@ -511,7 +511,7 @@ static int nilfs_recover_dsync_blocks(struct the_nilfs *nilfs,
pos = rb->blkoff << inode->i_blkbits; pos = rb->blkoff << inode->i_blkbits;
err = block_write_begin(inode->i_mapping, pos, blocksize, err = block_write_begin(inode->i_mapping, pos, blocksize,
0, &page, nilfs_get_block); &page, nilfs_get_block);
if (unlikely(err)) { if (unlikely(err)) {
loff_t isize = inode->i_size; loff_t isize = inode->i_size;
......
...@@ -894,7 +894,7 @@ static int ntfs_write_begin(struct file *file, struct address_space *mapping, ...@@ -894,7 +894,7 @@ static int ntfs_write_begin(struct file *file, struct address_space *mapping,
goto out; goto out;
} }
err = block_write_begin(mapping, pos, len, flags, pagep, err = block_write_begin(mapping, pos, len, pagep,
ntfs_get_block_write_begin); ntfs_get_block_write_begin);
out: out:
...@@ -975,7 +975,7 @@ int reset_log_file(struct inode *inode) ...@@ -975,7 +975,7 @@ int reset_log_file(struct inode *inode)
len = pos + PAGE_SIZE > log_size ? (log_size - pos) : PAGE_SIZE; len = pos + PAGE_SIZE > log_size ? (log_size - pos) : PAGE_SIZE;
err = block_write_begin(mapping, pos, len, 0, &page, err = block_write_begin(mapping, pos, len, &page,
ntfs_get_block_write_begin); ntfs_get_block_write_begin);
if (err) if (err)
goto out; goto out;
......
...@@ -321,8 +321,7 @@ static int omfs_write_begin(struct file *file, struct address_space *mapping, ...@@ -321,8 +321,7 @@ static int omfs_write_begin(struct file *file, struct address_space *mapping,
{ {
int ret; int ret;
ret = block_write_begin(mapping, pos, len, flags, pagep, ret = block_write_begin(mapping, pos, len, pagep, omfs_get_block);
omfs_get_block);
if (unlikely(ret)) if (unlikely(ret))
omfs_write_failed(mapping, pos + len); omfs_write_failed(mapping, pos + len);
......
...@@ -482,7 +482,7 @@ static int sysv_write_begin(struct file *file, struct address_space *mapping, ...@@ -482,7 +482,7 @@ static int sysv_write_begin(struct file *file, struct address_space *mapping,
{ {
int ret; int ret;
ret = block_write_begin(mapping, pos, len, flags, pagep, get_block); ret = block_write_begin(mapping, pos, len, pagep, get_block);
if (unlikely(ret)) if (unlikely(ret))
sysv_write_failed(mapping, pos + len); sysv_write_failed(mapping, pos + len);
......
...@@ -209,7 +209,7 @@ static int udf_write_begin(struct file *file, struct address_space *mapping, ...@@ -209,7 +209,7 @@ static int udf_write_begin(struct file *file, struct address_space *mapping,
{ {
int ret; int ret;
ret = block_write_begin(mapping, pos, len, flags, pagep, udf_get_block); ret = block_write_begin(mapping, pos, len, pagep, udf_get_block);
if (unlikely(ret)) if (unlikely(ret))
udf_write_failed(mapping, pos + len); udf_write_failed(mapping, pos + len);
return ret; return ret;
......
...@@ -500,8 +500,7 @@ static int ufs_write_begin(struct file *file, struct address_space *mapping, ...@@ -500,8 +500,7 @@ static int ufs_write_begin(struct file *file, struct address_space *mapping,
{ {
int ret; int ret;
ret = block_write_begin(mapping, pos, len, flags, pagep, ret = block_write_begin(mapping, pos, len, pagep, ufs_getfrag_block);
ufs_getfrag_block);
if (unlikely(ret)) if (unlikely(ret))
ufs_write_failed(mapping, pos + len); ufs_write_failed(mapping, pos + len);
......
...@@ -226,7 +226,7 @@ int __block_write_full_page(struct inode *inode, struct page *page, ...@@ -226,7 +226,7 @@ int __block_write_full_page(struct inode *inode, struct page *page,
int block_read_full_page(struct page*, get_block_t*); int block_read_full_page(struct page*, get_block_t*);
bool block_is_partially_uptodate(struct folio *, size_t from, size_t count); bool block_is_partially_uptodate(struct folio *, size_t from, size_t count);
int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len,
unsigned flags, struct page **pagep, get_block_t *get_block); struct page **pagep, get_block_t *get_block);
int __block_write_begin(struct page *page, loff_t pos, unsigned len, int __block_write_begin(struct page *page, loff_t pos, unsigned len,
get_block_t *get_block); get_block_t *get_block);
int block_write_end(struct file *, struct address_space *, int block_write_end(struct file *, struct address_space *,
......
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