diff --git a/fs/io_uring.c b/fs/io_uring.c index 9464f9470bbc242c0b65d1d925c2f59a66daffc6..60f1a81c6c354f67ea9117eeab49430cd817e51e 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2015,6 +2015,10 @@ static int io_do_iopoll(struct io_ring_ctx *ctx, unsigned int *nr_events, if (ret < 0) break; + /* iopoll may have completed current req */ + if (READ_ONCE(req->iopoll_completed)) + list_move_tail(&req->list, &done); + if (ret && spin) spin = false; ret = 0;