io_uring: fix stopping iopoll'ing too early
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 6 Jul 2020 14:59:30 +0000 (17:59 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 6 Jul 2020 15:06:20 +0000 (09:06 -0600)
commiteba0a4dd2aa5c47ca5b0c56ffb6d6665e047ff72
treee36780c1ba1eb115af4a80853ce48c5b25618b37
parent3aadc23e6054353ca056bf14e87250c79efbd7ed
io_uring: fix stopping iopoll'ing too early

Nobody adjusts *nr_events (number of completed requests) before calling
io_iopoll_getevents(), so the passed @min shouldn't be adjusted as well.
Othewise it can return less than initially asked @min without hitting
need_resched().

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