All of lore.kernel.org
 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 3/3] io_uring: don't repeat valid flag list
Date: Sun, 17 May 2020 14:13:42 +0300	[thread overview]
Message-ID: <68d4e966edfecad390f0367e71f9fc874dccb01a.1589713554.git.asml.silence@gmail.com> (raw)
In-Reply-To: <cover.1589713554.git.asml.silence@gmail.com>

req->flags stores all sqe->flags. After checking that sqe->flags are
valid set if IOSQE* flags, no need to double check it, just forward them
all.

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

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 9c5a95414cbd..83b599815cf0 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5924,9 +5924,7 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req,
 	}
 
 	/* same numerical values with corresponding REQ_F_*, safe to copy */
-	req->flags |= sqe_flags & (IOSQE_IO_DRAIN | IOSQE_IO_HARDLINK |
-					IOSQE_ASYNC | IOSQE_FIXED_FILE |
-					IOSQE_BUFFER_SELECT | IOSQE_IO_LINK);
+	req->flags |= sqe_flags;
 
 	if (!io_op_defs[req->opcode].needs_file)
 		return 0;
-- 
2.24.0


  parent reply	other threads:[~2020-05-17 11:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 11:13 [PATCH for-next 0/3] unrelated cleanups for next Pavel Begunkov
2020-05-17 11:13 ` [PATCH 1/3] io_uring: remove req->needs_fixed_files Pavel Begunkov
2020-05-17 11:13 ` [PATCH 2/3] io_uring: rename io_file_put() Pavel Begunkov
2020-05-17 11:13 ` Pavel Begunkov [this message]
2020-05-17 20:24 ` [PATCH for-next 0/3] unrelated cleanups for next 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=68d4e966edfecad390f0367e71f9fc874dccb01a.1589713554.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.