projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e857457
)
io_uring/rw: fix error'ed retry return values
author
Pavel Begunkov
<asml.silence@gmail.com>
Sun, 16 Oct 2022 21:42:57 +0000
(22:42 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:35:53 +0000
(12:35 +0200)
[ upstream commit
62bb0647b14646fa6c9aa25ecdf67ad18f13523c
]
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: 4d9cb92ca41dd ("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>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 49c0e4eb8987a7567edbb1ad643628157446c448..589e9e122e5d07823d66000bbdf957627321921f 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-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;