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>
Mon, 22 Mar 2021 13:47:12 +0000 (07:47 -0600)
commit10ed87d7f6ed430e3bebba2358b892347978eec5
tree0771b399107d20ba6d6e6ef515b4810b01aba536
parentffe014eeff3824f84d27957d31143470b02275e5
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