io-wq: fix hang after cancelling pending hashed work
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 23 Aug 2020 17:33:10 +0000 (20:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:43 +0000 (11:29 +0200)
commit13f35a2c0fd5c6a4fcd8903542b053bcc914fcf5
treee611be6427d30c925b2a13aee291dd78da2f6401
parent96d020ddff6adff267a6900bcfcd46a8993f5152
io-wq: fix hang after cancelling pending hashed work

commit 204361a77f4018627addd4a06877448f088ddfc0 upstream.

Don't forget to update wqe->hash_tail after cancelling a pending work
item, if it was hashed.

Cc: stable@vger.kernel.org # 5.7+
Reported-by: Dmitry Shulyak <yashulyak@gmail.com>
Fixes: 86f3cd1b589a1 ("io-wq: handle hashed writes in chains")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io-wq.c