Decrease kaio_active_count first, because user process may go away
after we notified it.
This commit is contained in:
parent
4ca4c9ee68
commit
9b84335c84
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154671
@ -944,6 +944,11 @@ aio_daemon(void *_id)
|
||||
/* Do the I/O function. */
|
||||
aio_process(aiocbe);
|
||||
|
||||
mtx_lock(&aio_job_mtx);
|
||||
/* Decrement the active job count. */
|
||||
ki->kaio_active_count--;
|
||||
mtx_unlock(&aio_job_mtx);
|
||||
|
||||
PROC_LOCK(userp);
|
||||
TAILQ_REMOVE(&ki->kaio_jobqueue, aiocbe, plist);
|
||||
aio_bio_done_notify(userp, aiocbe, DONE_QUEUE);
|
||||
@ -954,8 +959,6 @@ aio_daemon(void *_id)
|
||||
PROC_UNLOCK(userp);
|
||||
|
||||
mtx_lock(&aio_job_mtx);
|
||||
/* Decrement the active job count. */
|
||||
ki->kaio_active_count--;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user