two small fixes
Subsystems (3)
PATCH 1/2 io_uring: fail iopoll links if can't retry
In reply to Pavel BegunkovIf io_rw_should_reissue() fails in iopoll path and we can't reissue we fail the request. Don't forget to also mark it as failed, so links are broken.
--- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+)
fs/io_uring.c +1 -0
@@ -2687,6 +2687,7 @@ static void io_complete_rw_iopoll(struct kiocb *kiocb, long res, long res2) req->flags |=REQ_F_REISSUE ;return ; } +req_set_fail (req); req->result = res; }
Signature · 1 line
2.33.1
cover two small fixes
The first correctly attributes failed iopoll requests. 2/2 fixes a for-next bug.
Pavel Begunkov (2):
io_uring: fail iopoll links if can't retry
io_uring: fix async_data checks for msg setup
fs/io_uring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.33.1
PATCH 2/2 io_uring: fix async_data checks for msg setup
We should use req_has_async_data() instead of directly testing ->async_data to see if async_data has been allocated, there is one spot slipped that doesn't follow the rule.
--- fs/io_uring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/io_uring.c +2 -2
@@ -4683,9 +4683,9 @@ static int io_sync_file_range(struct io_kiocb *req, unsigned int issue_flags)static int io_setup_async_msg (struct io_kiocb *req,struct io_async_msghdr *kmsg) { -struct io_async_msghdr *async_msg = req->async_data; +struct io_async_msghdr *async_msg; -if (async_msg) +if (req_has_async_data (req))return -EAGAIN ;if (io_alloc_async_data (req)) {kfree (kmsg->free_iov);
Signature · 1 line
2.33.1
Greg KH
maintainerRe: [PATCH 1/2] io_uring: fail iopoll links if can't retry
In reply to Pavel BegunkovQuoted 25 lines · Pavel Begunkov
If
io_rw_should_reissue()fails in iopoll path and we can't reissue we fail the request. Don't forget to also mark it as failed, so links are broken.Signed-off-by Pavel Begunkov <[email protected]>--- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+)fs/io_uring.c +1
-0@@ -2687,6 +2687,7 @@ static void io_complete_rw_iopoll(struct kiocb *kiocb, long res, long res2) req->flags |=REQ_F_REISSUE ;return ; } +req_set_fail (req); req->result = res; }Signature · 1 line
2.33.1
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>