aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/weedfs_attr.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mount/weedfs_attr.go')
-rw-r--r--weed/mount/weedfs_attr.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/mount/weedfs_attr.go b/weed/mount/weedfs_attr.go
index 3550066e0..1d58e0852 100644
--- a/weed/mount/weedfs_attr.go
+++ b/weed/mount/weedfs_attr.go
@@ -44,6 +44,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 && entry != nil {
glog.V(4).Infof("%v setattr set size=%v chunks=%d", path, size, len(entry.GetChunks()))