diff options
author | Hans Holmberg <hans.holmberg@cnexlabs.com> | 2018-03-29 18:04:56 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-03-29 19:29:09 -0400 |
commit | 7be970b2258654ca48bdf35d532b2eeef038fe91 (patch) | |
tree | 891fe4b3cb0d52c1e7681410f5b9e40e151b7dc7 /drivers/lightnvm/pblk-init.c | |
parent | 5d149bfabeb889b7ee5cd6491bc6d2b5b20c4abd (diff) |
lightnvm: pblk: delete writer kick timer before stopping thread
Unless we delete the timer that wakes up the write thread
before we stop the thread we risk re-starting the thread, so
delete the timer first.
Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-init.c')
-rw-r--r-- | drivers/lightnvm/pblk-init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 8416910ee8bf..49c65f1dd48b 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c | |||
@@ -912,9 +912,9 @@ static void pblk_writer_stop(struct pblk *pblk) | |||
912 | WARN(pblk_rb_sync_count(&pblk->rwb), | 912 | WARN(pblk_rb_sync_count(&pblk->rwb), |
913 | "Stopping not fully synced write buffer\n"); | 913 | "Stopping not fully synced write buffer\n"); |
914 | 914 | ||
915 | del_timer_sync(&pblk->wtimer); | ||
915 | if (pblk->writer_ts) | 916 | if (pblk->writer_ts) |
916 | kthread_stop(pblk->writer_ts); | 917 | kthread_stop(pblk->writer_ts); |
917 | del_timer(&pblk->wtimer); | ||
918 | } | 918 | } |
919 | 919 | ||
920 | static void pblk_free(struct pblk *pblk) | 920 | static void pblk_free(struct pblk *pblk) |