mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
9f13c35b33
commit
c11368a57b
1 changed files with 1 additions and 3 deletions
|
@ -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 */
|
/* same numerical values with corresponding REQ_F_*, safe to copy */
|
||||||
req->flags |= sqe_flags & (IOSQE_IO_DRAIN | IOSQE_IO_HARDLINK |
|
req->flags |= sqe_flags;
|
||||||
IOSQE_ASYNC | IOSQE_FIXED_FILE |
|
|
||||||
IOSQE_BUFFER_SELECT | IOSQE_IO_LINK);
|
|
||||||
|
|
||||||
if (!io_op_defs[req->opcode].needs_file)
|
if (!io_op_defs[req->opcode].needs_file)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue