Commit e2df2ccb authored by Dylan Yudaken's avatar Dylan Yudaken Committed by Jens Axboe

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: default avatarDylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220708181838.1495428-2-dylany@fb.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 43e0bbbd
...@@ -506,6 +506,8 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, unsigned int 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) if (req->flags & REQ_F_POLLED)
*ret = IOU_STOP_MULTISHOT; *ret = IOU_STOP_MULTISHOT;
else
*ret = IOU_OK;
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment