]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
commitb56a8624351bb6a5599809fb882fb41dca07363f
tree4144b7fa8bdc482aec601e246a819b7307111ba8
parent5e2fdb002e35ba07c8a57ae2deb5c9122879b8f1
fuse: fix copy_file_range cache issues

BugLink: https://bugs.launchpad.net/bugs/1885322
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
fs/fuse/file.c