]> www.infradead.org Git - users/dwmw2/linux.git/commit
fuse: fix copy_file_range cache issues
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 20 May 2020 09:39:35 +0000 (11:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:51 +0000 (17:48 +0200)
commit44c7d90ef8178b7908d105070ab60b8bc30027f5
tree7207f02d5ad2cfbda6334ca4d293016fa7b59ca3
parent6dc1d4511e0ff6db45fafa76c74012ad05c30c34
fuse: fix copy_file_range cache issues

[ Upstream commit 2c4656dfd994538176db30ce09c02cc0dfc361ae ]

a) Dirty cache needs to be written back not just in the writeback_cache
case, since the dirty pages may come from memory maps.

b) The fuse_writeback_range() helper takes an inclusive interval, so the
end position needs to be pos+len-1 instead of pos+len.

Fixes: 88bc7d5097a1 ("fuse: add support for copy_file_range()")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/fuse/file.c