mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-20 00:07:58 +08:00
Revert "refactor: moved to locked entry" (#4035)
* Revert "refactor: moved to locked entry"
This reverts commit 94bc9afd9d
.
* only add LockedEntry, no changes to entryLock
* fix compilation
This commit is contained in:
@@ -46,6 +46,8 @@ func (wfs *WFS) CopyFileRange(cancel <-chan struct{}, in *fuse.CopyFileRangeIn)
|
||||
// lock source and target file handles
|
||||
fhOut.orderedMutex.Acquire(context.Background(), 1)
|
||||
defer fhOut.orderedMutex.Release(1)
|
||||
fhOut.entryLock.Lock()
|
||||
defer fhOut.entryLock.Unlock()
|
||||
|
||||
if fhOut.entry == nil {
|
||||
return 0, fuse.ENOENT
|
||||
@@ -54,6 +56,8 @@ func (wfs *WFS) CopyFileRange(cancel <-chan struct{}, in *fuse.CopyFileRangeIn)
|
||||
if fhIn.fh != fhOut.fh {
|
||||
fhIn.orderedMutex.Acquire(context.Background(), 1)
|
||||
defer fhIn.orderedMutex.Release(1)
|
||||
fhIn.entryLock.Lock()
|
||||
defer fhIn.entryLock.Unlock()
|
||||
}
|
||||
|
||||
// directories are not supported
|
||||
|
Reference in New Issue
Block a user