mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-15 19:56:03 +00:00
io_uring: add lookup table for various opcode needs
We currently have various switch statements that check if an opcode needs a file, mm, etc. These are hard to keep in sync as opcodes are added. Add a struct io_op_def that holds all of this information, so we have just one spot to update when opcodes are added. This also enables us to NOT allocate req->io if a deferred command doesn't need it, and corrects some mistakes we had in terms of what commands need mm context. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
add7b6b85a
commit
d3656344fe
1 changed files with 155 additions and 53 deletions
208
fs/io_uring.c
208
fs/io_uring.c
Loading…
Add table
Add a link
Reference in a new issue