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.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/mount/filehandle_read.go b/weed/mount/filehandle_read.go
index 0684d0ba4..7b2629c13 100644
--- a/weed/mount/filehandle_read.go
+++ b/weed/mount/filehandle_read.go
@@ -23,8 +23,8 @@ func (fh *FileHandle) readFromDirtyPages(buff []byte, startOffset int64, tsNs in
}
func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, int64, error) {
- fh.entryLock.Lock()
- defer fh.entryLock.Unlock()
+ fh.entryLock.RLock()
+ defer fh.entryLock.RUnlock()
fileFullPath := fh.FullPath()