aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/filehandle.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2021-08-11 09:10:25 -0700
committerGitHub <noreply@github.com>2021-08-11 09:10:25 -0700
commita51447ffcb86b56212792f95f10f49cc225d9693 (patch)
tree053c696153f6c01bd78cad3ba6e3fc81e669aece /weed/filesys/filehandle.go
parent5df38d610dc8ba2081088320e546f8a824d232cd (diff)
parent775dfbae85f1fb3c2bc38cc42c77fa35ecff3811 (diff)
downloadseaweedfs-a51447ffcb86b56212792f95f10f49cc225d9693.tar.xz
seaweedfs-a51447ffcb86b56212792f95f10f49cc225d9693.zip
Merge pull request #2252 from combineads/sync_isOpen
Synchronize number of open files
Diffstat (limited to 'weed/filesys/filehandle.go')
-rw-r--r--weed/filesys/filehandle.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go
index 5cd7ca948..34affddb9 100644
--- a/weed/filesys/filehandle.go
+++ b/weed/filesys/filehandle.go
@@ -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