io_uring/waitid: always remove waitid entry for cancel all
authorJens Axboe <axboe@kernel.dk>
Fri, 15 Mar 2024 21:42:49 +0000 (15:42 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 15 Mar 2024 21:42:49 +0000 (15:42 -0600)
commit2b35b8b43e07b1a6f06fdd84cf4b9eb24785896d
tree12c8b30e3d549124b0d53b332244aba917482a6a
parent30dab608c3cb99c2a05b76289fd05551703979ae
io_uring/waitid: always remove waitid entry for cancel all

We know the request is either being removed, or already in the process of
being removed through task_work, so we can delete it from our waitid list
upfront. This is important for remove all conditions, as we otherwise
will find it multiple times and prevent cancelation progress.

Remove the dead check in cancelation as well for the hash_node being
empty or not. We already have a waitid reference check for ownership,
so we don't need to check the list too.

Cc: stable@vger.kernel.org
Fixes: f31ecf671ddc ("io_uring: add IORING_OP_WAITID support")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/waitid.c