io_uring: allow re-poll if we made progress
authorJens Axboe <axboe@kernel.dk>
Thu, 21 Apr 2022 01:27:41 +0000 (19:27 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Apr 2022 01:33:51 +0000 (19:33 -0600)
commitd5e92661147bb7c1b97e4bf5973166fff24665ca
tree22dd09d2dd631f1cd6a0c6eeef56f4f211c86fb0
parent61405fa346fe6787579cc6fcfaea8db516680c31
io_uring: allow re-poll if we made progress

We currently check REQ_F_POLLED before arming async poll for a
notification to retry. If it's set, then we don't allow poll and will
punt to io-wq instead. This is done to prevent a situation where a buggy
driver will repeatedly return that there's space/data available yet we
get -EAGAIN.

However, if we already transferred data, then it should be safe to rely
on poll again. Gate the check on whether or not REQ_F_PARTIAL_IO is
also set.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c