public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH 1/1] io_uring/rw: reissue only from the same task
Date: Tue,  7 Jan 2025 14:11:56 +0000	[thread overview]
Message-ID: <e769b0d12b3c70861c2144b3ea58d3f08d542bbc.1736259071.git.asml.silence@gmail.com> (raw)

io_rw_should_reissue() tries to propagate EAGAIN back to io_uring when
happens off the submission path, which is when it's staying within the
same task, and so thread group checks don't make much sense.

Cc: [email protected]
Fixes: ef04688871f33 ("io_uring: don't block level reissue off completion path")
Signed-off-by: Pavel Begunkov <[email protected]>
---
 io_uring/rw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/rw.c b/io_uring/rw.c
index ca1b19d3d142..4d5aeff79130 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -485,7 +485,7 @@ static bool io_rw_should_reissue(struct io_kiocb *req)
 	 * Play it safe and assume not safe to re-import and reissue if we're
 	 * not in the original thread group (or in task context).
 	 */
-	if (!same_thread_group(req->tctx->task, current) || !in_task())
+	if (req->tctx->task != current || !in_task())
 		return false;
 	return true;
 }
-- 
2.47.1


             reply	other threads:[~2025-01-07 14:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 14:11 Pavel Begunkov [this message]
2025-01-07 14:31 ` [PATCH 1/1] io_uring/rw: reissue only from the same task Jens Axboe
2025-01-07 18:01   ` Pavel Begunkov

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=e769b0d12b3c70861c2144b3ea58d3f08d542bbc.1736259071.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    /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