add entry lock on file handle release

This commit is contained in:
chrislu committed 2022-12-25 00:30:42 -08:00
1 parent bfc3c11fdc
commit 363de28057
1 file changed
+5
+5
View File
@@ -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()
}