summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/splice.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-01-08 08:06:37 +0000
committergVisor bot <gvisor-bot@google.com>2020-01-08 08:06:37 +0000
commit9b13bda4baa8ddb2b4d71abcdb959c3b3a7832cc (patch)
tree77e8f4fab5c0e9449d1ae3e86b88492f786d62f2 /pkg/sentry/fs/splice.go
parenta91d38c14707db1fae950a1fb4720332ae20c15a (diff)
parenta53ac7307abfeb7172e67f48d0a7aaa4b5c3f31e (diff)
Merge release-20191213.0-69-ga53ac73 (automated)
Diffstat (limited to 'pkg/sentry/fs/splice.go')
-rw-r--r--pkg/sentry/fs/splice.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/fs/splice.go b/pkg/sentry/fs/splice.go
index 311798811..389c330a0 100644
--- a/pkg/sentry/fs/splice.go
+++ b/pkg/sentry/fs/splice.go
@@ -167,6 +167,11 @@ func Splice(ctx context.Context, dst *File, src *File, opts SpliceOpts) (int64,
if !srcPipe && !opts.SrcOffset {
atomic.StoreInt64(&src.offset, src.offset+n)
}
+
+ // Don't report any errors if we have some progress without data loss.
+ if w.Err == nil {
+ err = nil
+ }
}
// Drop locks.