public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>,
	[email protected], [email protected]
Subject: [PATCH 5/5] io_uring: remove io_prep_next_work()
Date: Sat, 29 Feb 2020 01:53:11 +0300	[thread overview]
Message-ID: <adc0dc18e4ac8f35d3fb5cb333feee89dbb4d7cc.1582929017.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

io-wq about IO_WQ_WORK_UNBOUND flag only while enqueueing, so it's
useless setting it for a next req of a link. Thet only useful thing
there is io_prep_linked_timeout(). Inline it.

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

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 3017db9088cd..00039545bfa3 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -974,17 +974,6 @@ static inline void io_req_work_drop_env(struct io_kiocb *req)
 	}
 }
 
-static inline void io_prep_next_work(struct io_kiocb *req,
-				     struct io_kiocb **link)
-{
-	const struct io_op_def *def = &io_op_defs[req->opcode];
-
-	if (!(req->flags & REQ_F_ISREG) && def->unbound_nonreg_file)
-		req->work.flags |= IO_WQ_WORK_UNBOUND;
-
-	*link = io_prep_linked_timeout(req);
-}
-
 static inline bool io_prep_async_work(struct io_kiocb *req,
 				      struct io_kiocb **link)
 {
@@ -5951,8 +5940,8 @@ static void io_wq_assign_next(struct io_wq_work **workptr, struct io_kiocb *req)
 {
 	struct io_kiocb *link;
 
-	io_prep_next_work(req, &link);
 	*workptr = &req->work;
+	link = io_prep_linked_timeout(req);
 	if (link) {
 		req->work.func = io_link_work_cb;
 		req->work.data = link;
-- 
2.24.0


      parent reply	other threads:[~2020-02-28 22:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 22:53 [PATCH 0/5] return nxt propagation within io-wq ctx Pavel Begunkov
2020-02-28 22:53 ` [PATCH 1/5] io_uring: remove @nxt from the handlers Pavel Begunkov
2020-02-28 22:53 ` [PATCH 2/5] io_uring/io-wq: pass *work instead of **workptr Pavel Begunkov
2020-02-28 22:53 ` [PATCH 3/5] io_uring/io-wq: allow put_work return next work Pavel Begunkov
2020-02-28 22:53 ` [PATCH 4/5] io_uring: remove extra nxt check after punt Pavel Begunkov
2020-02-28 22:53 ` Pavel Begunkov [this message]

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