* [PATCH] io_uring: simplify IORING_SETUP_DEFER_TASKRUN && !SQPOLL check
@ 2026-02-06 21:58 Caleb Sander Mateos
2026-02-10 3:16 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Caleb Sander Mateos @ 2026-02-06 21:58 UTC (permalink / raw)
To: Jens Axboe; +Cc: Caleb Sander Mateos, io-uring, linux-kernel
io_uring_sanitise_params() already rejects flags that include both
IORING_SETUP_SQPOLL and IORING_SETUP_DEFER_TASKRUN. So it's unnecessary
to check IORING_SETUP_SQPOLL in io_uring_create() when
IORING_SETUP_DEFER_TASKRUN has already been checked. Drop the
!(ctx->flags & IORING_SETUP_SQPOLL) check for the task_complete case.
Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
---
io_uring/io_uring.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 5c503a3f6ecc..8949e6d7400a 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2901,12 +2901,11 @@ static __cold int io_uring_create(struct io_ctx_config *config)
if (!(ctx->flags & IORING_SETUP_NO_SQARRAY))
static_branch_inc(&io_key_has_sqarray);
if ((ctx->flags & IORING_SETUP_DEFER_TASKRUN) &&
- !(ctx->flags & IORING_SETUP_IOPOLL) &&
- !(ctx->flags & IORING_SETUP_SQPOLL))
+ !(ctx->flags & IORING_SETUP_IOPOLL))
ctx->task_complete = true;
if (ctx->task_complete || (ctx->flags & IORING_SETUP_IOPOLL))
ctx->lockless_cq = true;
--
2.45.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] io_uring: simplify IORING_SETUP_DEFER_TASKRUN && !SQPOLL check
2026-02-06 21:58 [PATCH] io_uring: simplify IORING_SETUP_DEFER_TASKRUN && !SQPOLL check Caleb Sander Mateos
@ 2026-02-10 3:16 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2026-02-10 3:16 UTC (permalink / raw)
To: Caleb Sander Mateos; +Cc: io-uring, linux-kernel
On Fri, 06 Feb 2026 14:58:04 -0700, Caleb Sander Mateos wrote:
> io_uring_sanitise_params() already rejects flags that include both
> IORING_SETUP_SQPOLL and IORING_SETUP_DEFER_TASKRUN. So it's unnecessary
> to check IORING_SETUP_SQPOLL in io_uring_create() when
> IORING_SETUP_DEFER_TASKRUN has already been checked. Drop the
> !(ctx->flags & IORING_SETUP_SQPOLL) check for the task_complete case.
>
>
> [...]
Applied, thanks!
[1/1] io_uring: simplify IORING_SETUP_DEFER_TASKRUN && !SQPOLL check
commit: 7cb3a68376da0bc0afab8157223cb479c97de9ff
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-10 3:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 21:58 [PATCH] io_uring: simplify IORING_SETUP_DEFER_TASKRUN && !SQPOLL check Caleb Sander Mateos
2026-02-10 3:16 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox