mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-30 22:18:21 +00:00
cpu: change _cpu()->thread calls to current_thread() to fix smp race
This commit is contained in:
@@ -18,7 +18,7 @@ syscallret_t syscall_ftruncate(int fd, size_t size) {
|
||||
}
|
||||
|
||||
VOP_LOCK(file->vnode);
|
||||
ret.errno = VOP_RESIZE(file->vnode, size, &_cpu()->thread->proc->cred);
|
||||
ret.errno = VOP_RESIZE(file->vnode, size, ¤t_thread()->proc->cred);
|
||||
VOP_UNLOCK(file->vnode);
|
||||
|
||||
ret.ret = ret.errno ? -1 : 0;
|
||||
|
||||
Reference in New Issue
Block a user