io_uring: fix timeout cancel return code
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 25 Mar 2021 18:32:42 +0000 (18:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Apr 2021 11:36:10 +0000 (13:36 +0200)
commit7345d4b2d42122ed7da3714db0fc30ad5a93fee3
tree16f242225080c304d7a0e7531a8ff36de3717262
parent8f9049e70cd69e5146cc58411e6516365e187064
io_uring: fix timeout cancel return code

[ Upstream commit 1ee4160c73b2102a52bc97a4128a89c34821414f ]

When we cancel a timeout we should emit a sensible return code, like
-ECANCELED but not 0, otherwise it may trick users.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/7b0ad1065e3bd1994722702bd0ba9e7bc9b0683b.1616696997.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c