*/
io_tw_lock(ctx, locked);
hash_del(&req->hash_node);
+ req->flags &= ~REQ_F_HASH_LOCKED;
} else {
io_poll_req_delete(req, ctx);
}
* apoll requests already grab the mutex to complete in the tw handler,
* so removal from the mutex-backed hash is free, use it by default.
*/
- if (issue_flags & IO_URING_F_UNLOCKED)
- req->flags &= ~REQ_F_HASH_LOCKED;
- else
+ if (!(issue_flags & IO_URING_F_UNLOCKED))
req->flags |= REQ_F_HASH_LOCKED;
if (!def->pollin && !def->pollout)
if (!(issue_flags & IO_URING_F_UNLOCKED) &&
(req->ctx->flags & (IORING_SETUP_SQPOLL | IORING_SETUP_SINGLE_ISSUER)))
req->flags |= REQ_F_HASH_LOCKED;
- else
- req->flags &= ~REQ_F_HASH_LOCKED;
ret = __io_arm_poll_handler(req, poll, &ipt, poll->events, issue_flags);
if (ret > 0) {