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, 4 Apr 2021 21:27:24 +0000 (15:27 -0600)
commit09b66520579c6e5cfeeb5e6bd730d7a12fa75212
treee561ace591e1aa4dce2b40eb71828bb0094000c9
parent7ec360e58ef5db41454699839f94ad35c0041012
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