aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/filehandle_read.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mount/filehandle_read.go')
-rw-r--r--weed/mount/filehandle_read.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/mount/filehandle_read.go b/weed/mount/filehandle_read.go
index 5439b8bfd..88ab8612c 100644
--- a/weed/mount/filehandle_read.go
+++ b/weed/mount/filehandle_read.go
@@ -25,6 +25,9 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, error) {
fileFullPath := fh.FullPath()
+ fh.entryLock.Lock()
+ defer fh.entryLock.Unlock()
+
entry := fh.entry
if entry == nil {
return 0, io.EOF