req->result = mask;
req->task_work.func = func;
- percpu_ref_get(&req->ctx->refs);
/*
* If this fails, then the task is exiting. When a task exits, the
if (nxt)
__io_req_task_submit(nxt);
}
-
- percpu_ref_put(&ctx->refs);
}
static int io_poll_double_wake(struct wait_queue_entry *wait, unsigned mode,
if (io_poll_rewait(req, &apoll->poll)) {
spin_unlock_irq(&ctx->completion_lock);
- percpu_ref_put(&ctx->refs);
return;
}
else
__io_req_task_cancel(req, -ECANCELED);
- percpu_ref_put(&ctx->refs);
kfree(apoll->double_poll);
kfree(apoll);
}