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 4/4] io_uring: kill NULL checks for submit state
Date: Sun, 21 Jun 2020 13:09:53 +0300	[thread overview]
Message-ID: <4b127f2fd5c4f5587a8c1d497c055cf39ab31cd3.1592733956.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

After recent changes, io_submit_sqes() always passes valid submit state,
so kill leftovers checking it for NULL.

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

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 676911260f60..0bcf819e9661 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1371,11 +1371,7 @@ static struct io_kiocb *io_alloc_req(struct io_ring_ctx *ctx,
 	gfp_t gfp = GFP_KERNEL | __GFP_NOWARN;
 	struct io_kiocb *req;
 
-	if (!state) {
-		req = kmem_cache_alloc(req_cachep, gfp);
-		if (unlikely(!req))
-			goto fallback;
-	} else if (!state->free_reqs) {
+	if (!state->free_reqs) {
 		size_t sz;
 		int ret;
 
-- 
2.24.0


  parent reply	other threads:[~2020-06-21 10:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-21 10:09 [PATCH 0/4] small random patches Pavel Begunkov
2020-06-21 10:09 ` [PATCH 1/4] io_uring: remove setting REQ_F_MUST_PUNT in rw Pavel Begunkov
2020-06-21 10:09 ` [PATCH 2/4] io_uring: remove REQ_F_MUST_PUNT Pavel Begunkov
2020-06-21 10:09 ` [PATCH 3/4] io_uring: set @poll->file after @poll init Pavel Begunkov
2020-06-21 10:09 ` Pavel Begunkov [this message]
2020-06-22  3:06 ` [PATCH 0/4] small random patches 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=4b127f2fd5c4f5587a8c1d497c055cf39ab31cd3.1592733956.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