Skip to content

Commit 7cb3a68

Browse files
calebsanderaxboe
authored andcommitted
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>
1 parent 4adc13e commit 7cb3a68

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

io_uring/io_uring.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2949,8 +2949,7 @@ static __cold int io_uring_create(struct io_ctx_config *config)
29492949
static_branch_inc(&io_key_has_sqarray);
29502950

29512951
if ((ctx->flags & IORING_SETUP_DEFER_TASKRUN) &&
2952-
!(ctx->flags & IORING_SETUP_IOPOLL) &&
2953-
!(ctx->flags & IORING_SETUP_SQPOLL))
2952+
!(ctx->flags & IORING_SETUP_IOPOLL))
29542953
ctx->task_complete = true;
29552954

29562955
if (ctx->task_complete || (ctx->flags & IORING_SETUP_IOPOLL))

0 commit comments

Comments
 (0)