io_uring: don't init req->work fully in advance
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 22 Mar 2021 01:58:29 +0000 (01:58 +0000)
committerJens Axboe <axboe@kernel.dk>
Sun, 11 Apr 2021 23:41:59 +0000 (17:41 -0600)
commite1d675df1a36e33e43c614e01d9f714618ac121e
tree11e8cbc11b0c9b6df10155bb0540a63d52159031
parent8418f22a53795f4478a302aaec3d056795f56089
io_uring: don't init req->work fully in advance

req->work is mostly unused unless it's punted, and io_init_req() is too
hot for fully initialising it. Fortunately, we can skip init work.next
as it's controlled by io-wq, and can not touch work.flags by moving
everything related into io_prep_async_work(). The only field left is
req->work.creds, but there is nothing can be done, keep maintaining it.

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