]> git.baikalelectronics.ru Git - kernel.git/commit
io-wq: ensure work->task_pid is cleared on init
authorJens Axboe <axboe@kernel.dk>
Tue, 25 Feb 2020 18:52:56 +0000 (11:52 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 25 Feb 2020 20:23:48 +0000 (13:23 -0700)
commit6731abc38ff8485328175e46ad106bb39a38db30
tree4aed9d6c4febd91e6ec7d4139937897140b58fd0
parent43bbdccdef21647d7b5f05de181737dfef1f50f1
io-wq: ensure work->task_pid is cleared on init

We use ->task_pid for exit cancellation, but we need to ensure it's
cleared to zero for io_req_work_grab_env() to do the right thing. Take
a suggestion from Bart and clear the whole thing, just setting the
function passed in. This makes it more future proof as well.

Fixes: 75fb9dbf05bb ("io-wq: add io_wq_cancel_pid() to cancel based on a specific pid")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.h