io_uring: don't use complete_all() on SQPOLL thread exit
authorJens Axboe <axboe@kernel.dk>
Fri, 26 Feb 2021 20:46:49 +0000 (13:46 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 4 Mar 2021 13:34:04 +0000 (06:34 -0700)
commit8629397e6e2753bb4cc62ba48a12e1d4d912b6a4
treeca4c7e7144531e70dd0fd3781430922fcad5bfa0
parentba50a036f23c44608b1d903c34644a1acd5d21fa
io_uring: don't use complete_all() on SQPOLL thread exit

We want to reuse this completion, and a single complete should do just
fine. Ensure that we park ourselves first if requested, as that is what
lead to the initial deadlock in this area. If we've got someone attempting
to park us, then we can't proceed without having them finish first.

Fixes: 37d1e2e3642e ("io_uring: move SQPOLL thread io-wq forked worker")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c