in aio_aqueue, store same return code into job->_aiocb_private.error.
in aio_return, unlock proc lock before suword.
This commit is contained in:
parent
499168546f
commit
55a122bf28
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154854
@ -1339,7 +1339,7 @@ aio_aqueue(struct thread *td, struct aiocb *job, struct aioliojob *lj,
|
||||
}
|
||||
if (error) {
|
||||
uma_zfree(aiocb_zone, aiocbe);
|
||||
suword(&job->_aiocb_private.error, EBADF);
|
||||
suword(&job->_aiocb_private.error, error);
|
||||
return (error);
|
||||
}
|
||||
aiocbe->fd_file = fp;
|
||||
@ -1544,12 +1544,14 @@ aio_return(struct thread *td, struct aio_return_args *uap)
|
||||
cb->inputcharge = 0;
|
||||
}
|
||||
aio_free_entry(cb);
|
||||
PROC_UNLOCK(p);
|
||||
suword(&uaiocb->_aiocb_private.error, error);
|
||||
suword(&uaiocb->_aiocb_private.status, status);
|
||||
error = 0;
|
||||
} else
|
||||
} else {
|
||||
error = EINVAL;
|
||||
PROC_UNLOCK(p);
|
||||
PROC_UNLOCK(p);
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user