OSDN Git Service

io_uring: don't reinit submit state every time
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 10 Feb 2021 00:03:12 +0000 (00:03 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 14:28:43 +0000 (07:28 -0700)
commit5087275dba02943179720bd95d1d6c7047007550
treecf6b621d5c8eb5af58994e96edc89b1a8016b52a
parentba88ff112bdfde8103a8143f867bcdc46bc0e50f
io_uring: don't reinit submit state every time

As now submit_state is retained across syscalls, we can save ourself
from initialising it from ground up for each io_submit_sqes(). Set some
fields during ctx allocation, and just keep them always consistent.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
[axboe: remove unnecessary zeroing of ctx members]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c