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.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/weed/mount/weedfs_file_sync.go b/weed/mount/weedfs_file_sync.go
index 762a9b8de..d857606bd 100644
--- a/weed/mount/weedfs_file_sync.go
+++ b/weed/mount/weedfs_file_sync.go
@@ -116,13 +116,8 @@ func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32) fuse.Status {
defer fh.wfs.fhLockTable.ReleaseLock(fh.fh, fhActiveLock)
err := wfs.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error {
- fh.entryLock.Lock()
- defer fh.entryLock.Unlock()
entry := fh.GetEntry()
- if entry == nil {
- return nil
- }
entry.Name = name // this flush may be just after a rename operation
if entry.Attributes != nil {
@@ -141,7 +136,7 @@ func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32) fuse.Status {
request := &filer_pb.CreateEntryRequest{
Directory: string(dir),
- Entry: entry,
+ Entry: entry.GetEntry(),
Signatures: []int32{wfs.signature},
SkipCheckParentDirectory: true,
}