Support Directory Deletion
After we can create directories - we can try to delete them, too, with
stamfs_iop_rmdir():
- Make sure the directory is empty (it's up to US, not to the VFS. hence -
we could have changed this semantics if we wanted to).
- Unlink the directory (see next slide).
- Decrease the parent's link count - the child's ".." no longer points to it.
- Decrease the child's link count - the child's "." no longer points at
itself.
- Do not actually delete the directory's inode - the VFS will do it once
it sees the directory's link-count dropped to 0.
Originally written by
guy keren