Skip to content

Commit 62bb064

Browse files
isilenceaxboe
authored andcommitted
io_uring/rw: fix error'ed retry return values
Kernel test robot reports that we test negativity of an unsigned in io_fixup_rw_res() after a recent change, which masks error codes and messes up the return value in case I/O is re-retried and failed with an error. Fixes: 4d9cb92 ("io_uring/rw: fix short rw error handling") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/9754a0970af1861e7865f9014f735c70dc60bf79.1663071587.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 4d9cb92 commit 62bb064

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_uring/rw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static bool __io_complete_rw_common(struct io_kiocb *req, long res)
206206
return false;
207207
}
208208

209-
static inline unsigned io_fixup_rw_res(struct io_kiocb *req, unsigned res)
209+
static inline int io_fixup_rw_res(struct io_kiocb *req, long res)
210210
{
211211
struct io_async_rw *io = req->async_data;
212212

0 commit comments

Comments
 (0)