public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 2/6] io_uring: kill not used needs_file_no_error
Date: Mon,  1 Feb 2021 18:59:52 +0000	[thread overview]
Message-ID: <41da065c3de7989a9194c4cc3fba815e49d3a576.1612205712.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

We have no request types left using needs_file_no_error, remove it.

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 f3252ff6542b..bcd623512d17 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -788,8 +788,6 @@ struct io_submit_state {
 struct io_op_def {
 	/* needs req->file assigned */
 	unsigned		needs_file : 1;
-	/* don't fail if file grab fails */
-	unsigned		needs_file_no_error : 1;
 	/* hash wq insertion if file is a regular file */
 	unsigned		hash_reg_file : 1;
 	/* unbound wq insertion if file is a non-regular file */
@@ -6896,8 +6894,7 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req,
 		bool fixed = req->flags & REQ_F_FIXED_FILE;
 
 		req->file = io_file_get(state, req, READ_ONCE(sqe->fd), fixed);
-		if (unlikely(!req->file &&
-		    !io_op_defs[req->opcode].needs_file_no_error))
+		if (unlikely(!req->file))
 			ret = -EBADF;
 	}
 
-- 
2.24.0


  parent reply	other threads:[~2021-02-01 19:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 18:59 [PATCH 0/6] for-5.12 stuff Pavel Begunkov
2021-02-01 18:59 ` [PATCH 1/6] io_uring: fix inconsistent lock state Pavel Begunkov
2021-02-01 18:59 ` Pavel Begunkov [this message]
2021-02-01 18:59 ` [PATCH 3/6] io_uring: inline io_req_drop_files() Pavel Begunkov
2021-02-01 18:59 ` [PATCH 4/6] io_uring: remove work flags after cleanup Pavel Begunkov
2021-02-01 18:59 ` [PATCH 5/6] io_uring: deduplicate adding to REQ_F_INFLIGHT Pavel Begunkov
2021-02-01 18:59 ` [PATCH 6/6] io_uring: simplify do_read return parsing Pavel Begunkov
2021-02-01 20:11 ` [PATCH 0/6] for-5.12 stuff 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=41da065c3de7989a9194c4cc3fba815e49d3a576.1612205712.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