]> 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)
commit9b23bdb516caa0fd753306b248cf715c0b39eca0
tree7c7a9d3417a5b5bb7f8129a7e55b91a109e3642c
parenta10124933833ae9086a4dd4b0a7ee29e678583f5
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