public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 3/4] io_uring: simplify io_req_link_next()
Date: Thu, 21 Nov 2019 23:21:02 +0300	[thread overview]
Message-ID: <03812c2171ebbbe58bf32d96cabe58763e82e605.1574366549.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

"if (nxt)" is always true, as it was checked in the while's condition.
io_wq_current_is_worker() is unnecessary, as non-async callers don't
pass nxt, so io_queue_async_work() will be called for them anyway.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 fs/io_uring.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 63ef603d5fa0..1ab045e5d663 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -898,16 +898,7 @@ static void io_req_link_next(struct io_kiocb *req, struct io_kiocb **nxtptr)
 			nxt->flags |= REQ_F_LINK;
 		}
 
-		/*
-		 * If we're in async work, we can continue processing the chain
-		 * in this context instead of having to queue up new async work.
-		 */
-		if (nxt) {
-			if (io_wq_current_is_worker())
-				*nxtptr = nxt;
-			else
-				io_queue_async_work(nxt);
-		}
+		*nxtptr = nxt;
 		break;
 	}
 
-- 
2.24.0


  parent reply	other threads:[~2019-11-21 20:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 20:20 [RFC PATCH 0/4] cleanup io_put/free Pavel Begunkov
2019-11-21 20:21 ` [PATCH 1/4] io_uring: remove io_free_req_find_next() Pavel Begunkov
2019-11-21 20:21 ` [PATCH 2/4] io_uring: pass only !null to io_req_find_next() Pavel Begunkov
2019-11-21 20:21 ` Pavel Begunkov [this message]
2019-11-21 20:21 ` [PATCH 4/4] io_uring: only !null ptr to io_issue_sqe() 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=03812c2171ebbbe58bf32d96cabe58763e82e605.1574366549.git.asml.silence@gmail.com \
    [email protected] \
    [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