From 98a15feed048e556d3999b66b050ea0b977d3923 Mon Sep 17 00:00:00 2001 From: Harshit Mogalapalli Date: Tue, 10 Jan 2023 08:46:47 -0800 Subject: [PATCH] UPSTREAM: io_uring: Fix unsigned 'res' comparison with zero in io_fixup_rw_res() Smatch warning: io_fixup_rw_res() warn: unsigned 'res' is never less than zero. Change type of 'res' from unsigned to long. Fixes: d6b7efc722a2 ("io_uring/rw: fix error'ed retry return values") Signed-off-by: Harshit Mogalapalli Signed-off-by: Greg Kroah-Hartman Bug: 268174392 (cherry picked from commit 07b3672c4090d1e8147b1ae9c2546d8a8d8e13ae) Signed-off-by: Greg Kroah-Hartman Change-Id: I3534398af5e77e92a1ac48170e3ae4dffa42463b --- io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 35a9bcd5648b..5947c8140229 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -2712,7 +2712,7 @@ static bool __io_complete_rw_common(struct io_kiocb *req, long res) return false; } -static inline int io_fixup_rw_res(struct io_kiocb *req, unsigned res) +static inline int io_fixup_rw_res(struct io_kiocb *req, long res) { struct io_async_rw *io = req->async_data;