Skip to content

Commit 130a827

Browse files
calebsanderaxboe
authored andcommitted
io_uring/register: drop io_register_enable_rings() submitter_task check
io_register_enable_rings() checks that the io_ring_ctx is IORING_SETUP_R_DISABLED, which ensures submitter_task hasn't been assigned by io_uring_create() or a previous io_register_enable_rings() call. So drop the redundant check that submitter_task is NULL. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Joanne Koong <joannelkoong@gmail.com> Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent bcd4c95 commit 130a827

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/register.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int io_register_enable_rings(struct io_ring_ctx *ctx)
180180
if (!(ctx->flags & IORING_SETUP_R_DISABLED))
181181
return -EBADFD;
182182

183-
if (ctx->flags & IORING_SETUP_SINGLE_ISSUER && !ctx->submitter_task) {
183+
if (ctx->flags & IORING_SETUP_SINGLE_ISSUER) {
184184
ctx->submitter_task = get_task_struct(current);
185185
/*
186186
* Lazy activation attempts would fail if it was polled before

0 commit comments

Comments
 (0)