io-wq: cancel task_work on exit only targeting the current 'wq'
authorJens Axboe <axboe@kernel.dk>
Fri, 2 Apr 2021 01:57:07 +0000 (19:57 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 4 Apr 2021 21:28:41 +0000 (15:28 -0600)
commit0caa5982b839ec3313534f4c57bac849ea2641f7
tree680a6c9840ced8dca5bc58c46c5485e09ae026b6
parent7fabeeac15873b5d968a0d243d766bd2b8199815
io-wq: cancel task_work on exit only targeting the current 'wq'

With using task_work_cancel(), we're potentially canceling task_work
that isn't related to this specific io_wq. Use the newly added
task_work_cancel_match() to ensure that we only remove and cancel work
items that are specific to this io_wq.

Fixes: 6c40d316ff3a ("io-wq: eliminate the need for a manager thread")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c