提交 00d23d51 编写于 作者: J Jens Axboe

io_uring: ensure read requests go through -ERESTART* transformation

We need to call kiocb_done() for any ret < 0 to ensure that we always
get the proper -ERESTARTSYS (and friends) transformation done.

At some point this should be tied into general error handling, so we
can get rid of the various (mostly network) related commands that check
and perform this substitution.
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 9dab14b8
......@@ -3160,7 +3160,8 @@ static int io_read(struct io_kiocb *req, bool force_nonblock,
goto out_free;
return -EAGAIN;
} else if (ret < 0) {
goto out_free;
/* make sure -ERESTARTSYS -> -EINTR is done */
goto done;
}
/* read it all, or we did blocking attempt. no retry. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册