From: Caleb Sander Mateos Date: Mon, 5 Jan 2026 21:05:42 +0000 (-0700) Subject: io_uring/register: drop io_register_enable_rings() submitter_task check X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=130a82760718997806a618490f5b7ab06932bd9c;p=thirdparty%2Flinux.git 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 Reviewed-by: Joanne Koong Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Jens Axboe --- diff --git a/io_uring/register.c b/io_uring/register.c index 29393f93a4143..a3fef649272ba 100644 --- a/io_uring/register.c +++ b/io_uring/register.c @@ -180,7 +180,7 @@ static int io_register_enable_rings(struct io_ring_ctx *ctx) if (!(ctx->flags & IORING_SETUP_R_DISABLED)) return -EBADFD; - if (ctx->flags & IORING_SETUP_SINGLE_ISSUER && !ctx->submitter_task) { + if (ctx->flags & IORING_SETUP_SINGLE_ISSUER) { ctx->submitter_task = get_task_struct(current); /* * Lazy activation attempts would fail if it was polled before