Browse Source

lock instead of RLock, to prevent racing condition

https://github.com/seaweedfs/seaweedfs/discussions/5432#discussioncomment-8933608
pull/5436/head
chrislu 9 months ago
parent
commit
6aa804b368
  1. 4
      weed/mount/inode_to_path.go

4
weed/mount/inode_to_path.go

@ -146,8 +146,8 @@ func (i *InodeToPath) HasPath(path util.FullPath) bool {
}
func (i *InodeToPath) MarkChildrenCached(fullpath util.FullPath) {
i.RLock()
defer i.RUnlock()
i.Lock()
defer i.Unlock()
inode, found := i.path2inode[fullpath]
if !found {
// https://github.com/seaweedfs/seaweedfs/issues/4968

Loading…
Cancel
Save