mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
syscalls: fix more deadlocks and issues
This commit is contained in:
@@ -33,6 +33,8 @@ syscallret_t syscall_chdir(context_t *, char *upath) {
|
||||
if (ret.errno)
|
||||
goto cleanup;
|
||||
|
||||
VOP_UNLOCK(new);
|
||||
|
||||
if (new->type != V_TYPE_DIR) {
|
||||
ret.errno = ENOTDIR;
|
||||
goto cleanup;
|
||||
|
||||
@@ -78,8 +78,11 @@ syscallret_t syscall_mount(context_t *context, char *ubacking, char *umountpoint
|
||||
ret.errno = vfs_lookup(&backingnode, backingrefnode, backing, NULL, 0);
|
||||
if (ret.errno)
|
||||
goto cleanup;
|
||||
|
||||
VOP_UNLOCK(backingnode);
|
||||
}
|
||||
|
||||
|
||||
ret.errno = vfs_mount(backingnode, mountpointrefnode, mountpoint, fs, data);
|
||||
if (ubacking) {
|
||||
VOP_RELEASE(backingnode);
|
||||
|
||||
@@ -60,7 +60,7 @@ syscallret_t syscall_renameat(context_t *context, int olddirfd, char *uoldpath,
|
||||
if (oldcomponent == NULL && newcomponent == NULL)
|
||||
goto cleanup;
|
||||
|
||||
// TODO possibly deadlocks
|
||||
// TODO deadlocks.
|
||||
ret.errno = vfs_lookup(&sourcedirnode, olddirnode, oldpath, oldcomponent, VFS_LOOKUP_NOLINK | VFS_LOOKUP_PARENT);
|
||||
if (ret.errno)
|
||||
goto cleanup;
|
||||
|
||||
Reference in New Issue
Block a user