diff options
| author | chrislu <chris.lu@gmail.com> | 2023-09-23 10:35:29 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-09-23 10:35:29 -0700 |
| commit | ca1a5457ae3ce8043170a052cc841e6c73023fd6 (patch) | |
| tree | b538f217f2c03209e5f7a999fab026d48e841845 /weed/mount/filehandle.go | |
| parent | 186b1f029bcd67840803d8b611c571c186f52680 (diff) | |
| download | seaweedfs-origin/test-reverting-lock-table.tar.xz seaweedfs-origin/test-reverting-lock-table.zip | |
only revert lock tableorigin/test-reverting-lock-table
Diffstat (limited to 'weed/mount/filehandle.go')
| -rw-r--r-- | weed/mount/filehandle.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/mount/filehandle.go b/weed/mount/filehandle.go index 2e08432c0..6513d96ba 100644 --- a/weed/mount/filehandle.go +++ b/weed/mount/filehandle.go @@ -27,6 +27,7 @@ type FileHandle struct { dirtyPages *PageWriter reader *filer.ChunkReadAt contentType string + sync.RWMutex isDeleted bool @@ -101,9 +102,8 @@ func (fh *FileHandle) AddChunks(chunks []*filer_pb.FileChunk) { } func (fh *FileHandle) ReleaseHandle() { - - fhActiveLock := fh.wfs.fhLockTable.AcquireLock("ReleaseHandle", fh.fh, util.ExclusiveLock) - defer fh.wfs.fhLockTable.ReleaseLock(fh.fh, fhActiveLock) + fh.Lock() + defer fh.Unlock() fh.entryLock.Lock() defer fh.entryLock.Unlock() |
