diff --git a/block/fops.c b/block/fops.c index 9f2ecec406b04e51f305e997c090176db70ce90b..b432756570c6f11bcf0e7d2cc510459c39cf1fe8 100644 --- a/block/fops.c +++ b/block/fops.c @@ -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, void **fsdata) { - return block_write_begin(mapping, pos, len, flags, pagep, - blkdev_get_block); + return block_write_begin(mapping, pos, len, pagep, blkdev_get_block); } static int blkdev_write_end(struct file *file, struct address_space *mapping, diff --git a/fs/bfs/file.c b/fs/bfs/file.c index 03139344568f57a7a47b33a755c3304e56cad895..9408f45225cb89e742e745dfa0629493b85f8249 100644 --- a/fs/bfs/file.c +++ b/fs/bfs/file.c @@ -174,8 +174,7 @@ static int bfs_write_begin(struct file *file, struct address_space *mapping, { int ret; - ret = block_write_begin(mapping, pos, len, flags, pagep, - bfs_get_block); + ret = block_write_begin(mapping, pos, len, pagep, bfs_get_block); if (unlikely(ret)) bfs_write_failed(mapping, pos + len); diff --git a/fs/buffer.c b/fs/buffer.c index 2b5561ae5d0b32b038131a77db6073a0eccddb7f..4ec6eb03c0eb551ff0243c1a4854a7f3faccdc96 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2104,13 +2104,13 @@ static int __block_commit_write(struct inode *inode, struct page *page, * The filesystem needs to handle block truncation upon failure. */ 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; struct page *page; int status; - page = grab_cache_page_write_begin(mapping, index, flags); + page = grab_cache_page_write_begin(mapping, index, 0); if (!page) return -ENOMEM; @@ -2460,7 +2460,7 @@ int cont_write_begin(struct file *file, struct address_space *mapping, (*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); diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 52377a0ee735f9aafc2db83d8a707d598f7faa0f..97192932ea56b4648638a7db0d8e251f7641b9e0 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -892,8 +892,7 @@ ext2_write_begin(struct file *file, struct address_space *mapping, { int ret; - ret = block_write_begin(mapping, pos, len, flags, pagep, - ext2_get_block); + ret = block_write_begin(mapping, pos, len, pagep, ext2_get_block); if (ret < 0) ext2_write_failed(mapping, pos + len); return ret; diff --git a/fs/minix/inode.c b/fs/minix/inode.c index f1a6610e4ee69767efc67796356d7bc346376ccf..5e8d7ba661cf4e1b78f13f50b8d8334a0d313e7f 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c @@ -428,8 +428,7 @@ static int minix_write_begin(struct file *file, struct address_space *mapping, { int ret; - ret = block_write_begin(mapping, pos, len, flags, pagep, - minix_get_block); + ret = block_write_begin(mapping, pos, len, pagep, minix_get_block); if (unlikely(ret)) minix_write_failed(mapping, pos + len); diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 6045cea21f52248a1c4913cd3eb5c2d40b008a56..be09a0d10f04a84ba7b44b4738331afb04f3c806 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c @@ -258,8 +258,7 @@ static int nilfs_write_begin(struct file *file, struct address_space *mapping, if (unlikely(err)) return err; - err = block_write_begin(mapping, pos, len, flags, pagep, - nilfs_get_block); + err = block_write_begin(mapping, pos, len, pagep, nilfs_get_block); if (unlikely(err)) { nilfs_write_failed(mapping, pos + len); nilfs_transaction_abort(inode->i_sb); diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c index 9e2ed76c0f25cb928a426f13d437836905d9d7fc..0955b657938ff2ce993d92e7d8f81322ce71c2e1 100644 --- a/fs/nilfs2/recovery.c +++ b/fs/nilfs2/recovery.c @@ -511,7 +511,7 @@ static int nilfs_recover_dsync_blocks(struct the_nilfs *nilfs, pos = rb->blkoff << inode->i_blkbits; err = block_write_begin(inode->i_mapping, pos, blocksize, - 0, &page, nilfs_get_block); + &page, nilfs_get_block); if (unlikely(err)) { loff_t isize = inode->i_size; diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index 9eab11e3b03415528f9b7beedcea58a747c43553..3914138fd8bafdd06d18a8c84f619bf8afc1b7c6 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -894,7 +894,7 @@ static int ntfs_write_begin(struct file *file, struct address_space *mapping, goto out; } - err = block_write_begin(mapping, pos, len, flags, pagep, + err = block_write_begin(mapping, pos, len, pagep, ntfs_get_block_write_begin); out: @@ -975,7 +975,7 @@ int reset_log_file(struct inode *inode) 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); if (err) goto out; diff --git a/fs/omfs/file.c b/fs/omfs/file.c index 3f297b541713282fa157199f89fd77719f0b80e5..349b96d89c448f5dcc79a85ba2248142463b33ac 100644 --- a/fs/omfs/file.c +++ b/fs/omfs/file.c @@ -321,8 +321,7 @@ static int omfs_write_begin(struct file *file, struct address_space *mapping, { int ret; - ret = block_write_begin(mapping, pos, len, flags, pagep, - omfs_get_block); + ret = block_write_begin(mapping, pos, len, pagep, omfs_get_block); if (unlikely(ret)) omfs_write_failed(mapping, pos + len); diff --git a/fs/sysv/itree.c b/fs/sysv/itree.c index 409ab5e178031cf9229f704da8b5350871a00a29..96b7fd4facf3969dd83da9d3a8a0cc157e41f5b5 100644 --- a/fs/sysv/itree.c +++ b/fs/sysv/itree.c @@ -482,7 +482,7 @@ static int sysv_write_begin(struct file *file, struct address_space *mapping, { 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)) sysv_write_failed(mapping, pos + len); diff --git a/fs/udf/inode.c b/fs/udf/inode.c index ca4fa710e562f22f5db95dbba0c3214fe7c2b5ef..88a95886ce8ae6db5086a7ad5a9604fbee982593 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -209,7 +209,7 @@ static int udf_write_begin(struct file *file, struct address_space *mapping, { 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)) udf_write_failed(mapping, pos + len); return ret; diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index d0dda01620f0d7ca5675cde7139eccbe9cfd8da1..bd0e0c66f93d37274f5374c7c45ee5cda19c58d1 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c @@ -500,8 +500,7 @@ static int ufs_write_begin(struct file *file, struct address_space *mapping, { int ret; - ret = block_write_begin(mapping, pos, len, flags, pagep, - ufs_getfrag_block); + ret = block_write_begin(mapping, pos, len, pagep, ufs_getfrag_block); if (unlikely(ret)) ufs_write_failed(mapping, pos + len); diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index bcb4fe9b8575c21cd3f91a2e79c2abf8e203fb38..63e49dfa773888c3d0d8be8627cef5124f7244a0 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -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*); 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, - 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, get_block_t *get_block); int block_write_end(struct file *, struct address_space *,