From 3cb67f5833d801141c29ee9947a021069256f0f3 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 9 Jun 2015 13:27:02 +1000 Subject: [PATCH] Tightened forgetfs's post-destruction check, now that we can. --- samples/forgetfs/forget_fs.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/samples/forgetfs/forget_fs.go b/samples/forgetfs/forget_fs.go index eae5c4a..52ead10 100644 --- a/samples/forgetfs/forget_fs.go +++ b/samples/forgetfs/forget_fs.go @@ -196,19 +196,6 @@ func (fs *fsImpl) Check() { defer fs.mu.Unlock() for k, v := range fs.inodes { - // Special case: we don't require the root inode to have reached zero. - // OS X doesn't seem to send forgets for the root, and Linux only does - // sometimes. But we want to make sure it's not greater than one, which - // would be weird. - if k == fuseops.RootInodeID { - if v.lookupCount > 1 { - panic(fmt.Sprintf("Root has lookup count %v", v.lookupCount)) - } - - continue - } - - // Check other inodes. if v.lookupCount != 0 { panic(fmt.Sprintf("Inode %v has lookup count %v", k, v.lookupCount)) }