mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
io_uring/rw: fix error'ed retry return values
[ upstream commit62bb0647b1
] 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:4d9cb92ca4
("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e857457c6f
commit
d6b7efc722
@ -2701,7 +2701,7 @@ static bool __io_complete_rw_common(struct io_kiocb *req, long res)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline unsigned io_fixup_rw_res(struct io_kiocb *req, unsigned res)
|
||||
static inline int io_fixup_rw_res(struct io_kiocb *req, unsigned res)
|
||||
{
|
||||
struct io_async_rw *io = req->async_data;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user