diff --git a/internal/goofys.go b/internal/goofys.go index 4f4bd76f..c5c83245 100644 --- a/internal/goofys.go +++ b/internal/goofys.go @@ -764,6 +764,16 @@ func (fs *Goofys) ForgetInode( fs.mu.Lock() defer fs.mu.Unlock() + if inode.isDir() { + for _, child := range inode.dir.Children { + if *child.Name == "." || *child.Name == ".." { + continue + } + delete(fs.inodes, child.Id) + fs.forgotCnt += 1 + } + } + delete(fs.inodes, op.Inode) fs.forgotCnt += 1