io_uring: move poll recycling later in compl flushing
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 21 Mar 2022 22:02:23 +0000 (22:02 +0000)
committerJens Axboe <axboe@kernel.dk>
Sun, 17 Apr 2022 22:51:24 +0000 (16:51 -0600)
commit878355dbef6ba86aaab3a9c1879d76139d25f322
tree5211081e988dc85c02d6e3b6118bd6b4e58039b1
parent0ff4f49809b06a8b635daa406eaacf1785388558
io_uring: move poll recycling later in compl flushing

There is a new (req->flags & REQ_F_POLLED) check in
__io_submit_flush_completions() for poll recycling, however
io_free_batch_list() is a much better place for it. First, we prefer it
after putting the last req ref just to avoid potential problems in the
future. Also, it'll enable the recycling for IOPOLL and also will place
it closer to all other req->flags bits clean up requests.

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