int vfs_close(struct vnode *vnode)
Drops a reference to a vnode.
void kfree(void *)
Frees an object that kmalloc() gave.
int vfs_lookup_parent(const char *path, struct uio *uio, struct vnode **dir, char **name)
Finds the directory of a path's last component, and the component's name, to make or remove an entry ...
int vfs_finddir(struct vnode *dir, const char *name, struct dirent *dirent)
Finds the entry of a directory that has a name.
int vfs_dir_empty(struct vnode *dir)
Says whether a directory is empty, so that it can be removed.
Who does a filesystem operation: where its paths start, and its credentials and umask.
A file in memory (a vnode): what its inode says, and the kernel's own state.
static int vfs_remove(const char *path, struct uio *uio, int rmdir)
Removes the entry at a path, which must be an empty directory if rmdir is set, and anything but a dir...
int vfs_rmdir(const char *path, struct uio *uio)
Removes an empty directory at a path.
int vfs_unlink(const char *path, struct uio *uio)
Removes the name of a file (not a directory) at a path.
int vfs_access(struct vnode *vnode, struct uio *uio, int mode)
Checks whether a user may access a vnode in a way: the owner's permissions apply to its owner,...
int vfs_vget(struct vnode *super, ino_t ino, struct vnode **ref)
Gets the vnode of an inode, by its number.
int vfs_vunlink(struct vnode *dir, const char *fn, struct uio *uio)
Removes a name from a directory.