mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
fuse: Pass correct lend value to filemap_write_and_wait_range()
The acceptable maximum value of lend parameter in
filemap_write_and_wait_range() is LLONG_MAX rather than -1. And there is
also some logic depending on LLONG_MAX check in write_cache_pages(). So
let's pass LLONG_MAX to filemap_write_and_wait_range() in
fuse_writeback_range() instead.
Fixes: 59bda8ecee
("fuse: flush extending writes")
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Cc: <stable@vger.kernel.org> # v5.15
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
3e2b6fdbdc
commit
e388164ea3
1 changed files with 1 additions and 1 deletions
|
@ -2910,7 +2910,7 @@ fuse_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
|
|||
|
||||
static int fuse_writeback_range(struct inode *inode, loff_t start, loff_t end)
|
||||
{
|
||||
int err = filemap_write_and_wait_range(inode->i_mapping, start, -1);
|
||||
int err = filemap_write_and_wait_range(inode->i_mapping, start, LLONG_MAX);
|
||||
|
||||
if (!err)
|
||||
fuse_sync_writes(inode);
|
||||
|
|
Loading…
Add table
Reference in a new issue