28 return ret == -EBUSY ? -EEXIST : ret;
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_mknod(const char *path, mode_t mode, dev_t dev, struct uio *uio, struct vnode **ref)
Makes a node at a path.
int vfs_mkdir(const char *path, mode_t mode, struct uio *uio, struct vnode **ref)
Makes a directory at a path.
int vfs_creat(const char *path, mode_t mode, struct uio *uio, struct vnode **ref)
Makes a regular file at a path.
A device driver: its operations, any of which may be NULL.
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.
size_t ref
how many references there are to it
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_vmknod(struct vnode *dir, const char *name, mode_t mode, dev_t dev, struct uio *uio, struct vnode **ref)
Makes a node in a directory.