supports mknod, unlink

This commit is contained in:
chrislu
2022-02-13 03:09:24 -08:00
parent 813b868b9a
commit 6a42cb6b0b
4 changed files with 145 additions and 0 deletions

View File

@@ -69,3 +69,16 @@ func (i *InodeToPath) HasInode(inode uint64) bool {
_, found := i.inode2path[inode]
return found
}
func (i *InodeToPath) RemovePath(path util.FullPath) {
if path == "/" {
return
}
i.Lock()
defer i.Unlock()
inode, found := i.path2inode[path]
if found {
delete(i.path2inode, path)
delete(i.inode2path, inode)
}
}