Skip to content

Commit

Permalink
Use ST_DEAD in DeRef too
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalif committed Apr 16, 2023
1 parent b5fc921 commit 5a517ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/handles.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ func (inode *Inode) DeRef(n int64) (stale bool) {
panic(fmt.Sprintf("deref inode %v (%v) by %v from %v", inode.Id, inode.FullName(), n, res+n))
}
inode.logFuse("DeRef", n, res)
if res == 0 && inode.CacheState == ST_CACHED {
if res == 0 && inode.CacheState <= ST_DEAD {
inode.resetCache()
inode.fs.mu.Lock()
delete(inode.fs.inodes, inode.Id)
Expand Down

0 comments on commit 5a517ef

Please sign in to comment.