io_uring: dismantle req early and remove need_iter
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 28 Jun 2020 09:52:31 +0000 (12:52 +0300)
committerJens Axboe <axboe@kernel.dk>
Sun, 28 Jun 2020 14:10:17 +0000 (08:10 -0600)
commit2757a23e7f6441eabf605ca59eeb88c34071757d
treee0cd6ec793f8bcc6a7fbb9d6c0063b53d51fda28
parente6543a816edca00b6b4c48625d142059d7211059
io_uring: dismantle req early and remove need_iter

Every request in io_req_multi_free() is has ->file set. Instead of
pointlessly defering and counting reqs with file, dismantle it on place
and save for batch dealloc.

It also saves us from potentially skipping io_cleanup_req(), put_task(),
etc. Never happens though, becacuse ->file is always there.

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