diff options
| author | Caleb Sander Mateos <csander@purestorage.com> | 2026-02-07 00:58:04 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-02-10 06:12:36 +0300 |
| commit | 7cb3a68376da0bc0afab8157223cb479c97de9ff (patch) | |
| tree | e9e561e601e4db408c630c7222edb58dbf438903 | |
| parent | 4adc13ed7c281c16152a700e47b65d17de07321a (diff) | |
| download | linux-7cb3a68376da0bc0afab8157223cb479c97de9ff.tar.xz | |
io_uring: simplify IORING_SETUP_DEFER_TASKRUN && !SQPOLL check
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>
| -rw-r--r-- | io_uring/io_uring.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 1d5bc669afd9..3a7be1695c39 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -2949,8 +2949,7 @@ static __cold int io_uring_create(struct io_ctx_config *config) 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)) |
