aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/weedfs_file_sync.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mount/weedfs_file_sync.go')
-rw-r--r--weed/mount/weedfs_file_sync.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/mount/weedfs_file_sync.go b/weed/mount/weedfs_file_sync.go
index 1c80329c2..b7fffaaa3 100644
--- a/weed/mount/weedfs_file_sync.go
+++ b/weed/mount/weedfs_file_sync.go
@@ -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
@@ -136,7 +139,6 @@ func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32) fuse.Status {
entry.Attributes.Crtime = time.Now().Unix()
}
entry.Attributes.Mtime = time.Now().Unix()
- entry.Attributes.Collection, entry.Attributes.Replication = fh.dirtyPages.GetStorageOptions()
}
request := &filer_pb.CreateEntryRequest{