Skip to content

Commit

Permalink
avoid nil when invalidating entry
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislusf committed May 7, 2021
1 parent 787d297 commit 9c5088d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -1848,6 +1848,10 @@ func (s *Server) InvalidateEntry(parent Node, name string) error {
id, ok := s.getNodeId(parent)
if ok {
snode := s.node[id]
if snode == nil {
s.meta.Unlock()
return fuse.ErrNotCached
}
snode.wg.Add(1)
defer snode.wg.Done()
}
Expand Down

0 comments on commit 9c5088d

Please sign in to comment.