Skip to content

Commit 0a3737d

Browse files
committed
io_uring/rw: return IOU_ISSUE_SKIP_COMPLETE for multishot retry
If read multishot is being invoked from the poll retry handler, then we should return IOU_ISSUE_SKIP_COMPLETE rather than -EAGAIN. If not, then a CQE will be posted with -EAGAIN rather than triggering the retry when the file is flagged as readable again. Cc: stable@vger.kernel.org Reported-by: Sargun Dhillon <sargun@meta.com> Fixes: fc68fcd ("io_uring/rw: add support for IORING_OP_READ_MULTISHOT") Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 6f0974e commit 0a3737d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

io_uring/rw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,8 @@ int io_read_mshot(struct io_kiocb *req, unsigned int issue_flags)
947947
*/
948948
if (io_kbuf_recycle(req, issue_flags))
949949
rw->len = 0;
950+
if (issue_flags & IO_URING_F_MULTISHOT)
951+
return IOU_ISSUE_SKIP_COMPLETE;
950952
return -EAGAIN;
951953
}
952954

0 commit comments

Comments
 (0)