mount: file handle locks entry better

related to https://github.com/chrislusf/seaweedfs/issues/2952
This commit is contained in:
chrislu
2022-06-05 18:15:06 -07:00
parent 746092a60b
commit d65bb2c6df
7 changed files with 47 additions and 15 deletions

View File

@@ -118,6 +118,9 @@ func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32) fuse.Status {
err := wfs.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error {
fh.entryLock.Lock()
defer fh.entryLock.Unlock()
entry := fh.entry
if entry == nil {
return nil