summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-05-17 14:13:42 +0300
committerJens Axboe <axboe@kernel.dk>2020-05-17 14:10:07 -0600
commitc11368a57be460de889696f6ff8815fbcacf4db2 (patch)
treea0a2b29eee2d20d26d08f3f08407ab3ee13520fc /fs/io_uring.c
parent9f13c35b33fddb186beab9ef21c555a01e45f4d7 (diff)
downloadlwn-c11368a57be460de889696f6ff8815fbcacf4db2.tar.gz
lwn-c11368a57be460de889696f6ff8815fbcacf4db2.zip
io_uring: don't repeat valid flag list
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> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 99f39d766cfc..c43340396f6d 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5915,9 +5915,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;