]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix break condition for __io_uring_register() waiting
authorJens Axboe <axboe@kernel.dk>
Fri, 9 Oct 2020 01:09:46 +0000 (19:09 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 9 Oct 2020 02:37:45 +0000 (20:37 -0600)
commita969874581b16c86ff43817308dc3cd51ebac21c
treeaa462dd3eae9754ae41bb323e0ef79d25ef4d3d5
parentd2fd44041d1ed8b9ea1679e0378a23f6ca252809
io_uring: fix break condition for __io_uring_register() waiting

Colin reports that there's unreachable code, since we only ever break
if ret == 0. This is correct, and is due to a reversed logic condition
in when to break or not.

Break out of the loop if we don't process any task work, in that case
we do want to return -EINTR.

Fixes: d2205c3715d3 ("io_uring: process task work in io_uring_register()")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c