]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: do grab_env() just before punting
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 29 Jun 2020 16:18:43 +0000 (19:18 +0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 30 Jun 2020 14:40:00 +0000 (08:40 -0600)
commit3410b089c617d8fc3fb563936ceb9933b3659b50
tree7c7a9d3417a5b5bb7f8129a7e55b91a109e3642c
parente4e9e36be689679714072ba968e7f16ab7ceb564
io_uring: do grab_env() just before punting

Currently io_steal_work() is disabled, and every linked request should
go through task_work for initialisation. Do io_req_work_grab_env()
just before io-wq punting and for the whole link, so any request
reachable by io_steal_work() is prepared.

This is also interesting for another reason -- it localises
io_req_work_grab_env() into one place just before io-wq punting, helping
to to better manage req->work lifetime and add some neat
cleanup/optimisations later.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c