Skip to content

Commit

Permalink
lock instead of RLock, to prevent racing condition
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislusf committed Mar 27, 2024
1 parent 36fec34 commit 6aa804b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weed/mount/inode_to_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6aa804b

Please sign in to comment.