io-wq: fix IO_WQ_WORK_NO_CANCEL cancellation
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 1 Mar 2020 16:18:19 +0000 (19:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2020 07:26:56 +0000 (08:26 +0100)
commit54f10ea03eee3d60185421d77f39480f95eb38cd
treef3f49516b68f0d016851b091188425ca85f61919
parent0cd298a88e812c7f46a9bd83637cb013adf6e7c6
io-wq: fix IO_WQ_WORK_NO_CANCEL cancellation

[ Upstream commit fc04c39bae01a607454f7619665309870c60937a ]

To cancel a work, io-wq sets IO_WQ_WORK_CANCEL and executes the
callback. However, IO_WQ_WORK_NO_CANCEL works will just execute and may
return next work, which will be ignored and lost.

Cancel the whole link.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io-wq.c