Skip to content

Commit f38c7e3

Browse files
committed
io_uring: ensure async buffered read-retry is setup properly
A previous commit for fixing up short reads botched the async retry path, so we ended up going to worker threads more often than we should. Fix this up, so retries work the way they originally were intended to. Fixes: 227c0c9 ("io_uring: internally retry short reads") Reported-by: Hao_Xu <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 62c774e commit f38c7e3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/io_uring.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,10 +3172,8 @@ static int io_read(struct io_kiocb *req, bool force_nonblock,
31723172
goto done;
31733173
/* some cases will consume bytes even on error returns */
31743174
iov_iter_revert(iter, iov_count - iov_iter_count(iter));
3175-
ret = io_setup_async_rw(req, iovec, inline_vecs, iter, false);
3176-
if (ret)
3177-
goto out_free;
3178-
return -EAGAIN;
3175+
ret = 0;
3176+
goto copy_iov;
31793177
} else if (ret < 0) {
31803178
/* make sure -ERESTARTSYS -> -EINTR is done */
31813179
goto done;

0 commit comments

Comments
 (0)