diff --git a/internal/goofys.go b/internal/goofys.go index 4f4bd76f..186a757f 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() && len(inode.dir.Children) != 0 { + for _, children := range inode.dir.Children { + if *children.Name == "." || *children.Name == ".." { + continue + } + delete(fs.inodes, children.Id) + fs.forgotCnt += 1 + } + } + delete(fs.inodes, op.Inode) fs.forgotCnt += 1