lightnvm: pblk: prevent gc kicks when gc is not operational
authorHans Holmberg <hans.holmberg@cnexlabs.com>
Fri, 13 Oct 2017 12:46:34 +0000 (14:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:37 +0000 (10:10 +0100)
commit1b07f7511a773db3a165b0a2eca35df5ba6dd1d3
treeaaee55ea64dd80ec1724651a9600bc489d5dea68
parente6a9d261e95f5ba5cda38ca9c6b7e580656032c4
lightnvm: pblk: prevent gc kicks when gc is not operational

[ Upstream commit 3e3a5b8ebd5d3b1d68facc58b0674a2564653222 ]

GC can be kicked after it has been shut down when closing the last
line during exit, resulting in accesses to freed structures.

Make sure that GC is not triggered while it is not operational.
Also make sure that GC won't be re-activated during exit when
running on another processor by using timer_del_sync.

Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/lightnvm/pblk-gc.c
drivers/lightnvm/pblk-init.c