summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-10-19 17:04:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-10-19 17:04:52 -0700
commit715ca9dd687f89ddaac8ec8ccb3b5e5a30311a99 (patch)
treea7b2f5f69aa53400a8134cfe84de2905172fc92a
parent531643fcd98c8d045d72a05cb0aaf49e5a4bdf5c (diff)
parentae6a888a4357131c01d85f4c91fb32552dd0bf70 (diff)
Merge tag 'io_uring-6.12-20241019' of git://git.kernel.dk/linux
Pull one more io_uring fix from Jens Axboe: "Fix for a regression introduced in 6.12-rc2, where a condition check was negated and hence -EAGAIN would bubble back up up to userspace rather than trigger a retry condition" * tag 'io_uring-6.12-20241019' of git://git.kernel.dk/linux: io_uring/rw: fix wrong NOWAIT check in io_rw_init_file()
-rw-r--r--io_uring/rw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/rw.c b/io_uring/rw.c
index 80ae3c2ebb70..354c4e175654 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -807,7 +807,7 @@ static int io_rw_init_file(struct io_kiocb *req, fmode_t mode, int rw_type)
* reliably. If not, or it IOCB_NOWAIT is set, don't retry.
*/
if (kiocb->ki_flags & IOCB_NOWAIT ||
- ((file->f_flags & O_NONBLOCK && (req->flags & REQ_F_SUPPORT_NOWAIT))))
+ ((file->f_flags & O_NONBLOCK && !(req->flags & REQ_F_SUPPORT_NOWAIT))))
req->flags |= REQ_F_NOWAIT;
if (ctx->flags & IORING_SETUP_IOPOLL) {