aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/filehandle.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2023-09-22 21:54:08 -0700
committerchrislu <chris.lu@gmail.com>2023-09-22 21:54:08 -0700
commit900abd44c158ea9ff3e0ca3eddabff9f9c3f1bf6 (patch)
tree9cc17ea8305abda04023e2ba32421e37ebe408a3 /weed/mount/filehandle.go
parentdf027fdddf7e71c31c8828ed598dc9510f15fa08 (diff)
parent9fc79bebf97be1c52b824fea03a431320ca097c1 (diff)
downloadseaweedfs-900abd44c158ea9ff3e0ca3eddabff9f9c3f1bf6.tar.xz
seaweedfs-900abd44c158ea9ff3e0ca3eddabff9f9c3f1bf6.zip
Merge branch 'track-mount-e2e' of https://github.com/seaweedfs/seaweedfs into track-mount-e2e
Diffstat (limited to 'weed/mount/filehandle.go')
-rw-r--r--weed/mount/filehandle.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/mount/filehandle.go b/weed/mount/filehandle.go
index 6513d96ba..2e08432c0 100644
--- a/weed/mount/filehandle.go
+++ b/weed/mount/filehandle.go
@@ -27,7 +27,6 @@ type FileHandle struct {
dirtyPages *PageWriter
reader *filer.ChunkReadAt
contentType string
- sync.RWMutex
isDeleted bool
@@ -102,8 +101,9 @@ func (fh *FileHandle) AddChunks(chunks []*filer_pb.FileChunk) {
}
func (fh *FileHandle) ReleaseHandle() {
- fh.Lock()
- defer fh.Unlock()
+
+ fhActiveLock := fh.wfs.fhLockTable.AcquireLock("ReleaseHandle", fh.fh, util.ExclusiveLock)
+ defer fh.wfs.fhLockTable.ReleaseLock(fh.fh, fhActiveLock)
fh.entryLock.Lock()
defer fh.entryLock.Unlock()