struct io_wq_hash *hash;
refcount_t refs;
- struct completion done;
+ struct completion started;
atomic_t worker_refs;
struct completion worker_done;
current->flags |= PF_IO_WORKER;
wq->manager = current;
- complete(&wq->done);
+ complete(&wq->started);
do {
set_current_state(TASK_INTERRUPTIBLE);
ret = io_wq_fork_thread(io_wq_manager, wq);
current->flags &= ~PF_IO_WORKER;
if (ret >= 0) {
- wait_for_completion(&wq->done);
+ wait_for_completion(&wq->started);
return 0;
}
}
wq->task_pid = current->pid;
- init_completion(&wq->done);
+ init_completion(&wq->started);
refcount_set(&wq->refs, 1);
init_completion(&wq->worker_done);