]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: copy_file_range should truncate cache
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 20 May 2020 09:39:35 +0000 (11:39 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 20 May 2020 09:39:35 +0000 (11:39 +0200)
commit410d9deafef751f0228d35be5cba057713cf9644
tree649d02d1880d0a51a97399c9a2b5e58c842cb53a
parentb327c81fd59810fe3f35e07671b6aa5f7f8ac985
fuse: copy_file_range should truncate cache

After the copy operation completes the cache is not up-to-date.  Truncate
all pages in the interval that has successfully been copied.

Truncating completely copied dirty pages is okay, since the data has been
overwritten anyway.  Truncating partially copied dirty pages is not okay;
add a comment for now.

Fixes: 6c505d9af570 ("fuse: add support for copy_file_range()")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c