io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] io_uring: rename prev to head
Date: Tue, 17 Dec 2019 22:26:56 +0300	[thread overview]
Message-ID: <96a50f1e5e114421847f7063f98d111b9892a7c7.1576610536.git.asml.silence@gmail.com> (raw)
In-Reply-To: <cover.1576610536.git.asml.silence@gmail.com>

Calling "prev" a head of a link is a bit misleading. Rename it

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 fs/io_uring.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index eb6d897ea087..e8ce224dc82c 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3399,10 +3399,10 @@ static bool io_submit_sqe(struct io_kiocb *req, struct io_submit_state *state,
 	 * conditions are true (normal request), then just queue it.
 	 */
 	if (*link) {
-		struct io_kiocb *prev = *link;
+		struct io_kiocb *head = *link;
 
 		if (req->sqe->flags & IOSQE_IO_DRAIN)
-			(*link)->flags |= REQ_F_DRAIN_LINK | REQ_F_IO_DRAIN;
+			head->flags |= REQ_F_DRAIN_LINK | REQ_F_IO_DRAIN;
 
 		if (req->sqe->flags & IOSQE_IO_HARDLINK)
 			req->flags |= REQ_F_HARDLINK;
@@ -3415,11 +3415,11 @@ static bool io_submit_sqe(struct io_kiocb *req, struct io_submit_state *state,
 		ret = io_req_defer_prep(req);
 		if (ret) {
 			/* fail even hard links since we don't submit */
-			prev->flags |= REQ_F_FAIL_LINK;
+			head->flags |= REQ_F_FAIL_LINK;
 			goto err_req;
 		}
-		trace_io_uring_link(ctx, req, prev);
-		list_add_tail(&req->link_list, &prev->link_list);
+		trace_io_uring_link(ctx, req, head);
+		list_add_tail(&req->link_list, &head->link_list);
 	} else if (req->sqe->flags & (IOSQE_IO_LINK|IOSQE_IO_HARDLINK)) {
 		req->flags |= REQ_F_LINK;
 		if (req->sqe->flags & IOSQE_IO_HARDLINK)
-- 
2.24.0


  reply	other threads:[~2019-12-17 19:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 23:22 [PATCH 0/3] io_uring: submission path cleanup Pavel Begunkov
2019-12-16 23:22 ` [PATCH 1/3] io_uring: rename prev to head Pavel Begunkov
2019-12-16 23:22 ` [PATCH 2/3] io_uring: move trace_submit_sqe into submit_sqe Pavel Begunkov
2019-12-16 23:22 ` [PATCH 3/3] io_uring: move *queue_link_head() from common path Pavel Begunkov
2019-12-16 23:38   ` Pavel Begunkov
2019-12-17 16:45     ` Jens Axboe
2019-12-17 17:37       ` Jens Axboe
2019-12-17 17:52         ` Pavel Begunkov
2019-12-17 18:01           ` Jens Axboe
2019-12-17 18:05             ` Pavel Begunkov
2019-12-17 18:07               ` Jens Axboe
2019-12-17 18:12                 ` Pavel Begunkov
2019-12-17 18:15                   ` Jens Axboe
2019-12-17 14:00   ` Dmitry Dolgov
2019-12-17 14:16     ` Pavel Begunkov
2019-12-17 18:15 ` [PATCH 0/3] io_uring: submission path cleanup Jens Axboe
2019-12-17 19:26 ` [PATCH v2 " Pavel Begunkov
2019-12-17 19:26   ` Pavel Begunkov [this message]
2019-12-17 19:26   ` [PATCH 2/3] io_uring: move trace_submit_sqe into submit_sqe Pavel Begunkov
2019-12-17 19:26   ` [PATCH v2 3/3] io_uring: move *queue_link_head() from common path Pavel Begunkov
2019-12-17 21:15   ` [PATCH v2 0/3] io_uring: submission path cleanup 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=96a50f1e5e114421847f7063f98d111b9892a7c7.1576610536.git.asml.silence@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --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;
as well as URLs for NNTP newsgroup(s).