diff --git a/weed/mount/filehandle.go b/weed/mount/filehandle.go index 9f1a863d1..1dd70e861 100644 --- a/weed/mount/filehandle.go +++ b/weed/mount/filehandle.go @@ -90,6 +90,11 @@ func (fh *FileHandle) CloseReader() { } func (fh *FileHandle) Release() { + fh.entryLock.Lock() + defer fh.entryLock.Unlock() + + glog.V(4).Infof("Release %s fh %d", fh.entry.Name, fh.handle) + fh.dirtyPages.Destroy() fh.CloseReader() }