Support Directory Creation
When we instantiated the root-inode, we attached an inode-operations object -
struct stamfs_dir_iops. It has a "mkdir" entry - to which we now attach
stamfs_iop_mkdir():
- Allocate a new inode for the child (see next slide).
- Turn this inode into an empty-directory inode.
- Increase the parent's link-count (the child's ".." points to the parent).
- Increase the child's link-count (the child's "." points back at the child).
- Add the child to the list of children of the parent.
- Instantiate the child's dentry.
Originally written by
guy keren