vfs: change VOP_UNLINK parameters, more fixes

This commit is contained in:
Matheus
2024-08-26 22:41:01 -03:00
parent 0236ad663f
commit 76c74cfca1
4 changed files with 63 additions and 21 deletions
+2 -1
View File
@@ -235,7 +235,7 @@ static int tmpfs_access(vnode_t *vnode, mode_t mode, cred_t *cred) {
return auth_filesystem_check(cred, auth_filesystem_convertaccess(mode), vnode) ? EACCES : 0;
}
static int tmpfs_unlink(vnode_t *node, char *name, cred_t *cred) {
static int tmpfs_unlink(vnode_t *node, vnode_t *child, char *name, cred_t *cred) {
tmpfsnode_t *tmpnode = (tmpfsnode_t *)node;
if (node->type != V_TYPE_DIR)
return ENOTDIR;
@@ -254,6 +254,7 @@ static int tmpfs_unlink(vnode_t *node, char *name, cred_t *cred) {
vnode_t *unlinknode = r;
tmpfsnode_t *unlinktmpnode = r;
__assert(child == unlinknode);
err = hashtable_remove(&tmpnode->children, name, namelen);
if (err)