diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-03-15 23:52:36 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-15 23:52:36 +0000 |
commit | ed21cec72081f64b619dc1580b1700eb976f32d4 (patch) | |
tree | 775233b5e0539bd9c62c29d53416e3732fa1ff8e | |
parent | 7ac52482a3e5997d33b9baa53e0c931027f7a455 (diff) | |
parent | ec45d969236bb98a83e7da0466bd67e540c5e8b5 (diff) |
Merge release-20210309.0-26-gec45d9692 (automated)
-rw-r--r-- | pkg/sentry/fsimpl/gofer/handle.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/gofer/handle.go b/pkg/sentry/fsimpl/gofer/handle.go index 0bc201d1c..5c57f6fea 100644 --- a/pkg/sentry/fsimpl/gofer/handle.go +++ b/pkg/sentry/fsimpl/gofer/handle.go @@ -124,8 +124,9 @@ func (h *handle) writeFromBlocksAt(ctx context.Context, srcs safemem.BlockSeq, o return 0, cperr } n, err := h.file.writeAt(ctx, buf[:cp], offset) + // err takes precedence over cperr. if err != nil { return uint64(n), err } - return cp, cperr + return uint64(n), cperr } |