mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
io_uring: treat -EAGAIN for REQ_F_NOWAIT as final for io-wq
commit a9be202269 upstream.
io-wq assumes that an issue is blocking, but it may not be if the
request type has asked for a non-blocking attempt. If we get
-EAGAIN for that case, then we need to treat it as a final result
and not retry or arm poll for it.
Cc: stable@vger.kernel.org # 5.10+
Link: https://github.com/axboe/liburing/issues/897
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5302e81aa2
commit
1b87f546a0
@@ -1803,6 +1803,14 @@ fail:
|
|||||||
ret = io_issue_sqe(req, issue_flags);
|
ret = io_issue_sqe(req, issue_flags);
|
||||||
if (ret != -EAGAIN)
|
if (ret != -EAGAIN)
|
||||||
break;
|
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;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We can get EAGAIN for iopolled IO even though we're
|
* We can get EAGAIN for iopolled IO even though we're
|
||||||
* forcing a sync submission from here, since we can't
|
* forcing a sync submission from here, since we can't
|
||||||
|
|||||||
Reference in New Issue
Block a user