summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--io_uring/io_uring.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 2ec011f0ba7d..6229a49c0c33 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2479,7 +2479,9 @@ static inline int io_cqring_wait_schedule(struct io_ring_ctx *ctx,
return -EINTR;
if (unlikely(io_should_wake(iowq)))
return 0;
- if (!schedule_hrtimeout(timeout, HRTIMER_MODE_ABS))
+ if (*timeout == KTIME_MAX)
+ schedule();
+ else if (!schedule_hrtimeout(timeout, HRTIMER_MODE_ABS))
return -ETIME;
return 0;
}