return ret;
}
-inline void io_req_task_complete(struct io_kiocb *req, bool *locked)
+
+void io_req_task_complete(struct io_kiocb *req, bool *locked)
{
- if (*locked) {
- req->cqe.flags |= io_put_kbuf(req, 0);
+ if (req->flags & (REQ_F_BUFFER_SELECTED|REQ_F_BUFFER_RING)) {
+ unsigned issue_flags = *locked ? 0 : IO_URING_F_UNLOCKED;
+
+ req->cqe.flags |= io_put_kbuf(req, issue_flags);
+ }
+
+ if (*locked)
io_req_add_compl_list(req);
- } else {
- req->cqe.flags |= io_put_kbuf(req, IO_URING_F_UNLOCKED);
+ else
io_req_complete_post(req);
- }
}
/*