diff --git a/pkg/vfs/vfs.go b/pkg/vfs/vfs.go index f335e89cb3a5..ceaea18fca85 100644 --- a/pkg/vfs/vfs.go +++ b/pkg/vfs/vfs.go @@ -778,6 +778,10 @@ func (v *VFS) CopyFileRange(ctx Context, nodeIn Ino, fhIn, offIn uint64, nodeOut defer hi.removeOp(ctx) } + err = v.writer.Flush(ctx, nodeIn) + if err != 0 { + return + } err = v.writer.Flush(ctx, nodeOut) if err != 0 { return