summaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm
diff options
context:
space:
mode:
authorHans Holmberg <hans.holmberg@cnexlabs.com>2018-03-30 00:04:57 +0200
committerJens Axboe <axboe@kernel.dk>2018-03-30 01:29:09 +0200
commitb966c50b14de56cd73d40d3fa87b48bbab6e5c8a (patch)
tree465e3afd6ad02d51ed246a717775fdf4286ff8ea /drivers/lightnvm
parentlightnvm: pblk: delete writer kick timer before stopping thread (diff)
downloadlinux-b966c50b14de56cd73d40d3fa87b48bbab6e5c8a.tar.xz
linux-b966c50b14de56cd73d40d3fa87b48bbab6e5c8a.zip
lightnvm: pblk: allow allocation of new lines during shutdown
When shutting down pblk the write buffer is flushed and if the current line can't fit the data in the write buffer we need to allocate a new line, so remove the check that prevents this. 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')
-rw-r--r--drivers/lightnvm/pblk-core.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index 22e61cd4f801..8848443a0721 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -1407,13 +1407,6 @@ struct pblk_line *pblk_line_replace_data(struct pblk *pblk)
l_mg->data_line = new;
spin_lock(&l_mg->free_lock);
- if (pblk->state != PBLK_STATE_RUNNING) {
- l_mg->data_line = NULL;
- l_mg->data_next = NULL;
- spin_unlock(&l_mg->free_lock);
- goto out;
- }
-
pblk_line_setup_metadata(new, l_mg, &pblk->lm);
spin_unlock(&l_mg->free_lock);