Commit 9cc2a6f4 authored by Aaron Jacobs's avatar Aaron Jacobs

Implemented Destroy for forgetfs.

parent 630f40de
...@@ -164,6 +164,11 @@ func (in *inode) DecrementLookupCount(n uint64) { ...@@ -164,6 +164,11 @@ func (in *inode) DecrementLookupCount(n uint64) {
in.lookupCount -= n in.lookupCount -= n
} }
// Decrement the lookup count to zero.
func (in *inode) Destroy() {
in.DecrementLookupCount(in.lookupCount)
}
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// Helpers // Helpers
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
...@@ -372,3 +377,9 @@ func (fs *fsImpl) OpenDir( ...@@ -372,3 +377,9 @@ func (fs *fsImpl) OpenDir(
return return
} }
func (fs *fsImpl) Destroy() {
for _, in := range fs.inodes {
in.Destroy()
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment