]> git.hungrycats.org Git - linux/commitdiff
io_uring: simplify IORING_SETUP_DEFER_TASKRUN && !SQPOLL check
authorCaleb Sander Mateos <csander@purestorage.com>
Tue, 25 Aug 2026 19:47:42 +0000 (15:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Sep 2026 12:31:47 +0000 (14:31 +0200)
[ Upstream commit 7cb3a68376da0bc0afab8157223cb479c97de9ff ]

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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: cd305ee3633a ("io_uring: defer eventfd signaling when queued from a wakeup handler")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/io_uring.c

index 7f398c4a3a6eb494a1afd4d437e048ca69c0a4cd..1dc160d86ea74b9e673c04f7f61b7e5ea9525bb1 100644 (file)
@@ -3867,8 +3867,7 @@ static __cold int io_uring_create(unsigned entries, struct io_uring_params *p,
                static_branch_deferred_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))