io_uring: move inflight un-tracking into cleanup
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 20 Apr 2021 11:03:31 +0000 (12:03 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 20 Apr 2021 18:55:28 +0000 (12:55 -0600)
commit3a0a690235923b838390500fd46edc23bed092e0
tree9fd92cce720bb1457262e564ccd9f54b4aa9cb8d
parenteb372672295450caa34875d64415735b26e7888a
io_uring: move inflight un-tracking into cleanup

REQ_F_INFLIGHT deaccounting doesn't do any spinlocking or resource
freeing anymore, so it's safe to move it into the normal cleanup flow,
i.e. into io_clean_op(), so making it cleaner.

Also move io_req_needs_clean() to be first in io_dismantle_req() so it
doesn't reload req->flags.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/90653a3a5de4107e3a00536fa4c2ea5f2c38a4ac.1618916549.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c