]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix hanging iopoll in case of -EAGAIN
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 25 Jun 2020 09:37:10 +0000 (12:37 +0300)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Jun 2020 13:20:43 +0000 (07:20 -0600)
commitf947d584aa761b9c674194e1855a1c7cedf9d37d
tree3983571ba27df563c6972dac57113a6ca5a1d649
parent19ed2546df42df29622a6a3965055a5f88c1607d
io_uring: fix hanging iopoll in case of -EAGAIN

io_do_iopoll() won't do anything with a request unless
req->iopoll_completed is set. So io_complete_rw_iopoll() has to set
it, otherwise io_do_iopoll() will poll a file again and again even
though the request of interest was completed long time ago.

Also, remove -EAGAIN check from io_issue_sqe() as it races with
the changed lines. The request will take the long way and be
resubmitted from io_iopoll*().

io_kiocb's result and iopoll_completed")

Fixes: 433f0be153d5 ("io_uring: add memory barrier to synchronize
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c