diff options
author | Caleb Sander Mateos <csander@purestorage.com> | 2025-02-12 03:51:18 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-02-18 20:32:22 +0300 |
commit | 62aa9805d123165102273eb277f776aaca908e0e (patch) | |
tree | 6560f9e4b14e2eacbcaead30cff07ba1ceff339b | |
parent | 94a4274bb6ebc5b4293559304d0f00928de0d8c0 (diff) | |
download | linux-62aa9805d123165102273eb277f776aaca908e0e.tar.xz |
io_uring: use lockless_cq flag in io_req_complete_post()
io_uring_create() computes ctx->lockless_cq as:
ctx->task_complete || (ctx->flags & IORING_SETUP_IOPOLL)
So use it to simplify that expression in io_req_complete_post().
Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Li Zetao <lizetao1@huawei.com>
Link: https://lore.kernel.org/r/20250212005119.3433005-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | io_uring/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index b688953d1de8..bd1ab21ed539 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -900,7 +900,7 @@ static void io_req_complete_post(struct io_kiocb *req, unsigned issue_flags) * Handle special CQ sync cases via task_work. DEFER_TASKRUN requires * the submitter task context, IOPOLL protects with uring_lock. */ - if (ctx->task_complete || (ctx->flags & IORING_SETUP_IOPOLL)) { + if (ctx->lockless_cq) { req->io_task_work.func = io_req_task_complete; io_req_task_work_add(req); return; |