Implemented Destroy for forgetfs.

geesefs-0-30-9
Aaron Jacobs 2015-06-09 11:10:39 +10:00
parent 630f40de94
commit 9cc2a6f450
1 changed files with 11 additions and 0 deletions

View File

@ -164,6 +164,11 @@ func (in *inode) DecrementLookupCount(n uint64) {
in.lookupCount -= n
}
// Decrement the lookup count to zero.
func (in *inode) Destroy() {
in.DecrementLookupCount(in.lookupCount)
}
////////////////////////////////////////////////////////////////////////
// Helpers
////////////////////////////////////////////////////////////////////////
@ -372,3 +377,9 @@ func (fs *fsImpl) OpenDir(
return
}
func (fs *fsImpl) Destroy() {
for _, in := range fs.inodes {
in.Destroy()
}
}