Skip to content

Commit

Permalink
Fix panic due to TryFlush on possibly nil inode
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalif committed Apr 15, 2024
1 parent 3bb77e7 commit 2b974d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/goofys.go
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,10 @@ func (fs *Goofys) Flusher() {
fs.mu.RLock()
inode := fs.inodes[fuseops.InodeID(inodeID)]
fs.mu.RUnlock()
started := inode.TryFlush(priority)
started := false
if inode != nil {
started = inode.TryFlush(priority)
}
curPriorityOk = curPriorityOk || started
}
}
Expand Down

0 comments on commit 2b974d9

Please sign in to comment.