• Miklos Szeredi's avatar
    fuse: fix copy_file_range() in the writeback case · a2bc9236
    Miklos Szeredi authored
    Prior to sending COPY_FILE_RANGE to userspace filesystem, we must flush all
    dirty pages in both the source and destination files.
    
    This patch adds the missing flush of the source file.
    
    Tested on libfuse-3.5.0 with:
    
      libfuse/example/passthrough_ll /mnt/fuse/ -o writeback
      libfuse/test/test_syscalls /mnt/fuse/tmp/test
    
    Fixes: 88bc7d50 ("fuse: add support for copy_file_range()")
    Cc: <stable@vger.kernel.org> # v4.20
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    a2bc9236
file.c 79.4 KB