]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: don't delay iopoll'ed req completion
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 6 Jul 2020 14:59:29 +0000 (17:59 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 6 Jul 2020 15:06:20 +0000 (09:06 -0600)
commit0ac7a6ac155ac06f2b12a79c338be869d6e36eae
tree78402f4b738e24c646cf9f2f9b8dc66aabc78f30
parent09d0e5f1c9dd8bc6742357900ccea9e6773e8076
io_uring: don't delay iopoll'ed req completion

->iopoll() may have completed current request, but instead of reaping
it, io_do_iopoll() just continues with the next request in the list.
As a result it can leave just polled and completed request in the list
up until next syscall. Even outer loop in io_iopoll_getevents() doesn't
help the situation.

E.g. poll_list: req0 -> req1
If req0->iopoll() completed both requests, and @min<=1,
then @req0 will be left behind.

Check whether a req was completed after ->iopoll().

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