[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1519200181-10886-2-git-send-email-hans.ml.holmberg@owltronix.com>
Date: Wed, 21 Feb 2018 09:02:59 +0100
From: hans.ml.holmberg@...tronix.com
To: Matias Bjørling <mb@...htnvm.io>
Cc: Javier González <jg@...htnvm.io>,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Hans Holmberg <hans.holmberg@...xlabs.com>
Subject: [PATCH 1/3] lightnvm: pblk: delete writer kick timer before stopping thread
From: Hans Holmberg <hans.holmberg@...xlabs.com>
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@...xlabs.com>
---
drivers/lightnvm/pblk-init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index a2b54a8..862ac4e 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -923,9 +923,9 @@ static void pblk_writer_stop(struct pblk *pblk)
WARN(pblk_rb_sync_count(&pblk->rwb),
"Stopping not fully synced write buffer\n");
+ del_timer_sync(&pblk->wtimer);
if (pblk->writer_ts)
kthread_stop(pblk->writer_ts);
- del_timer(&pblk->wtimer);
}
static void pblk_free(struct pblk *pblk)
--
2.7.4
Powered by blists - more mailing lists