Synchronize number of open files

This commit is contained in:
byunghwa.yun
2021-08-11 22:58:35 +09:00
parent 5df38d610d
commit 775dfbae85
2 changed files with 7 additions and 4 deletions

View File

@@ -210,7 +210,9 @@ func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) err
fh.Lock()
defer fh.Unlock()
fh.f.wfs.handlesLock.Lock()
fh.f.isOpen--
fh.f.wfs.handlesLock.Unlock()
if fh.f.isOpen <= 0 {
fh.f.entry = nil