vfs: fix lookup VFS_LOOKUP_NOLINK flag

This commit is contained in:
Matheus
2023-04-30 21:19:25 -03:00
parent 6d42a6f91c
commit 6aef90a979
+1 -1
View File
@@ -300,7 +300,7 @@ int vfs_lookup(vnode_t **result, vnode_t *start, char *path, char *lastcomp, int
}
// dereference symlink
if (next->type == V_TYPE_LINK) {
if (next->type == V_TYPE_LINK && (islast == false || (islast == true && (flags & VFS_LOOKUP_NOLINK) == 0))) {
// get path
char *linkderef;
VOP_LOCK(next);