public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Joanne Koong <joannelkoong@gmail.com>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 3/3] io_uring/register: drop io_register_enable_rings() submitter_task check
Date: Thu, 8 Jan 2026 14:10:26 -0800	[thread overview]
Message-ID: <CAJnrk1YTzFTxVEV9kBoj_dfXo1FmZ9jVhMi3sAdiuyWeoN-4PA@mail.gmail.com> (raw)
In-Reply-To: <20260105210543.3471082-4-csander@purestorage.com>

On Mon, Jan 5, 2026 at 1:05 PM Caleb Sander Mateos
<csander@purestorage.com> wrote:
>
> 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>
> ---
>  io_uring/register.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/io_uring/register.c b/io_uring/register.c
> index 8104728af294..78434869270c 100644
> --- a/io_uring/register.c
> +++ b/io_uring/register.c
> @@ -178,11 +178,11 @@ static __cold int io_register_restrictions(struct io_ring_ctx *ctx,
>  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
>                  * submitter_task is set.
>                  */
> --
> 2.45.2
>

Reviewed-by: Joanne Koong <joannelkoong@gmail.com>

  reply	other threads:[~2026-01-08 22:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 21:05 [PATCH v7 0/3] io_uring: use release-acquire ordering for IORING_SETUP_R_DISABLED Caleb Sander Mateos
2026-01-05 21:05 ` [PATCH v7 1/3] " Caleb Sander Mateos
2026-01-05 21:05 ` [PATCH v7 2/3] io_uring/msg_ring: drop unnecessary submitter_task checks Caleb Sander Mateos
2026-01-08  4:25   ` Joanne Koong
2026-01-08  7:06     ` Caleb Sander Mateos
2026-01-08 22:04       ` Joanne Koong
2026-01-05 21:05 ` [PATCH v7 3/3] io_uring/register: drop io_register_enable_rings() submitter_task check Caleb Sander Mateos
2026-01-08 22:10   ` Joanne Koong [this message]
2026-01-06 18:41 ` [PATCH v7 0/3] io_uring: use release-acquire ordering for IORING_SETUP_R_DISABLED Gabriel Krisman Bertazi
2026-01-08  4:54 ` Hillf Danton
2026-01-12 18:34 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJnrk1YTzFTxVEV9kBoj_dfXo1FmZ9jVhMi3sAdiuyWeoN-4PA@mail.gmail.com \
    --to=joannelkoong@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox