aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/weedfs.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-08-26 16:49:51 -0700
committerchrislu <chris.lu@gmail.com>2022-08-26 16:49:51 -0700
commit8dae81c5edaea2b25a79d49c4a08ffadfdc6fddc (patch)
treece1ef0be521398d06255a97eb531d97b7f940b47 /weed/mount/weedfs.go
parente0f4366f4ca3259bfe582fb1dd8951f2005160ab (diff)
parent5df105b1f94b8776d18159ae213da39299e2ea37 (diff)
downloadseaweedfs-8dae81c5edaea2b25a79d49c4a08ffadfdc6fddc.tar.xz
seaweedfs-8dae81c5edaea2b25a79d49c4a08ffadfdc6fddc.zip
Merge branch 'master' of https://github.com/seaweedfs/seaweedfs
Diffstat (limited to 'weed/mount/weedfs.go')
-rw-r--r--weed/mount/weedfs.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go
index 9f1d85ab5..7cff71c52 100644
--- a/weed/mount/weedfs.go
+++ b/weed/mount/weedfs.go
@@ -135,10 +135,11 @@ func (wfs *WFS) maybeReadEntry(inode uint64) (path util.FullPath, fh *FileHandle
}
var found bool
if fh, found = wfs.fhmap.FindFileHandle(inode); found {
- entry = fh.GetEntry()
- if entry != nil && fh.entry.Attributes == nil {
- entry.Attributes = &filer_pb.FuseAttributes{}
- }
+ entry = fh.UpdateEntry(func(entry *filer_pb.Entry) {
+ if entry != nil && fh.entry.Attributes == nil {
+ entry.Attributes = &filer_pb.FuseAttributes{}
+ }
+ })
} else {
entry, status = wfs.maybeLoadEntry(path)
}