From c9f5acc2d10ef8c20194ce25bffb1e204b18bfdf Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Tue, 27 Jun 2017 17:45:29 +0200 Subject: fix race on packfile writer --- storage/filesystem/internal/dotgit/writers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage') diff --git a/storage/filesystem/internal/dotgit/writers.go b/storage/filesystem/internal/dotgit/writers.go index e0a41a8..531259b 100644 --- a/storage/filesystem/internal/dotgit/writers.go +++ b/storage/filesystem/internal/dotgit/writers.go @@ -236,7 +236,7 @@ func (s *syncedReader) Seek(offset int64, whence int) (int64, error) { } p, err := s.r.Seek(offset, whence) - s.read = uint64(p) + atomic.StoreUint64(&s.read, uint64(p)) return p, err } -- cgit