mount: file handle locks entry better
related to https://github.com/chrislusf/seaweedfs/issues/2952
This commit is contained in:
@@ -43,6 +43,10 @@ func (wfs *WFS) SetAttr(cancel <-chan struct{}, input *fuse.SetAttrIn, out *fuse
|
||||
if status != fuse.OK {
|
||||
return status
|
||||
}
|
||||
if fh != nil {
|
||||
fh.entryLock.Lock()
|
||||
defer fh.entryLock.Unlock()
|
||||
}
|
||||
|
||||
if size, ok := input.GetSize(); ok {
|
||||
glog.V(4).Infof("%v setattr set size=%v chunks=%d", path, size, len(entry.Chunks))
|
||||
|
||||
Reference in New Issue
Block a user