• Pavel Begunkov's avatar
    io_uring: fix hanging iopoll in case of -EAGAIN · cd664b0e
    Pavel Begunkov authored
    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: bbde017a ("io_uring: add memory barrier to synchronize
    Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    cd664b0e
io_uring.c 194 KB