diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-09-27 06:29:44 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-09-27 06:32:18 -0600 |
commit | 1409c4a4d81e3a86fecbc42889541e866fc30abe (patch) | |
tree | 1c584b6d51aad80fe9c2f1f81f2eec41fb6c5dcc /src | |
parent | fe13f562c148e2e0d18ed84600a49dd7b8ccf264 (diff) | |
download | liburing-1409c4a4d81e3a86fecbc42889541e866fc30abe.tar.gz liburing-1409c4a4d81e3a86fecbc42889541e866fc30abe.tar.bz2 |
Fix io_uring_wait_cqes_timeout() with ts == NULL
The TIMEOUT command requires a valid timeout set, or we fail. We
don't need to arm a timer if we only need to wait for a certain
number of requests, so just punt to io_uring_wait_cqes() instead.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src')
-rw-r--r-- | src/queue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/queue.c b/src/queue.c index 46d1510..1493d38 100644 --- a/src/queue.c +++ b/src/queue.c @@ -148,6 +148,9 @@ int io_uring_wait_cqes_timeout(struct io_uring *ring, { int ret; + if (!ts) + return io_uring_wait_cqes(ring, cqe_ptr, wait_nr); + if (wait_nr) { struct io_uring_sqe *sqe; |