summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorDylan Yudaken <dylany@fb.com>2022-07-08 11:18:35 -0700
committerJens Axboe <axboe@kernel.dk>2022-07-24 18:39:17 -0600
commite2df2ccb753e3b598a9045760e79f1847f7b31cd (patch)
tree9ca82f8acdb08227738337832e09e988acd7dfb4 /io_uring
parent43e0bbbd0b0e30d232fd8e9e908125b5c49a9fbc (diff)
io_uring: fix multishot ending when not polled
If multishot is not actually polling then return IOU_OK rather than the result. If the result was > 0 this will confuse things further up the callstack which expect a return <= 0. Fixes: 1300ebb20286 ("io_uring: multishot recv") Signed-off-by: Dylan Yudaken <dylany@fb.com> Link: https://lore.kernel.org/r/20220708181838.1495428-2-dylany@fb.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/net.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/net.c b/io_uring/net.c
index 185553174437..eb939899e9c5 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -506,6 +506,8 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, unsigned int c
if (req->flags & REQ_F_POLLED)
*ret = IOU_STOP_MULTISHOT;
+ else
+ *ret = IOU_OK;
return true;
}