public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 1/5] io_uring: clean io_poll_complete
Date: Fri, 28 Feb 2020 10:36:35 +0300	[thread overview]
Message-ID: <03a82a0acf501a8cbb1a9e1acf3fc394c1255839.1582874853.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

Deduplicate call to io_cqring_fill_event(), plain and easy

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

diff --git a/fs/io_uring.c b/fs/io_uring.c
index d88346d4b781..87dfe397de74 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3636,10 +3636,7 @@ static void io_poll_complete(struct io_kiocb *req, __poll_t mask, int error)
 	struct io_ring_ctx *ctx = req->ctx;
 
 	req->poll.done = true;
-	if (error)
-		io_cqring_fill_event(req, error);
-	else
-		io_cqring_fill_event(req, mangle_poll(mask));
+	io_cqring_fill_event(req, error ? error : mangle_poll(mask));
 	io_commit_cqring(ctx);
 }
 
-- 
2.24.0


  reply	other threads:[~2020-02-28  7:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28  7:36 [PATCH 0/5] random io-wq and io_uring bits Pavel Begunkov
2020-02-28  7:36 ` Pavel Begunkov [this message]
2020-02-28  7:36 ` [PATCH 2/5] io_uring: extract kmsg copy helper Pavel Begunkov
2020-02-28  7:36 ` [PATCH 3/5] io-wq: remove unused IO_WQ_WORK_HAS_MM Pavel Begunkov
2020-02-28  7:36 ` [PATCH 4/5] io_uring: remove IO_WQ_WORK_CB Pavel Begunkov
2020-02-28  7:36 ` [PATCH 5/5] io-wq: use BIT for ulong hash Pavel Begunkov
2020-02-28 14:07 ` [PATCH 0/5] random io-wq and io_uring bits Jens Axboe
2020-02-28 14:26 ` 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=03a82a0acf501a8cbb1a9e1acf3fc394c1255839.1582874853.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