diff options
-rw-r--r-- | io_uring/io_uring.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index f65c6811ede8..774b1ae8adf7 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -7066,6 +7066,14 @@ static void io_wq_submit_work(struct io_wq_work *work) */ if (ret != -EAGAIN || !(req->ctx->flags & IORING_SETUP_IOPOLL)) break; + + /* + * If REQ_F_NOWAIT is set, then don't wait or retry with + * poll. -EAGAIN is final for that case. + */ + if (req->flags & REQ_F_NOWAIT) + break; + cond_resched(); } while (1); } |