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:
Chris Lu
2022-12-05 12:32:27 -08:00
committed by GitHub
parent 38479b6329
commit dac9c28d05
7 changed files with 34 additions and 7 deletions

View File

@@ -38,6 +38,8 @@ func (wfs *WFS) Lseek(cancel <-chan struct{}, in *fuse.LseekIn, out *fuse.LseekO
// lock the file until the proper offset was calculated
fh.orderedMutex.Acquire(context.Background(), 1)
defer fh.orderedMutex.Release(1)
fh.entryLock.Lock()
defer fh.entryLock.Unlock()
fileSize := int64(filer.FileSize(fh.GetEntry()))
offset := max(int64(in.Offset), 0)