mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
lightnvm: pblk: free write buffer on init failure
Refactor the way we free the write buffer to ensure that all entries get freed in case of an error on the init sequence. Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
cc4f5ba1fb
commit
c6847e4e35
1 changed files with 2 additions and 1 deletions
|
@ -355,6 +355,8 @@ static void pblk_core_free(struct pblk *pblk)
|
|||
mempool_destroy(pblk->e_rq_pool);
|
||||
mempool_destroy(pblk->w_rq_pool);
|
||||
|
||||
pblk_rwb_free(pblk);
|
||||
|
||||
pblk_free_global_caches(pblk);
|
||||
}
|
||||
|
||||
|
@ -931,7 +933,6 @@ static void pblk_tear_down(struct pblk *pblk)
|
|||
pblk_pipeline_stop(pblk);
|
||||
pblk_writer_stop(pblk);
|
||||
pblk_rb_sync_l2p(&pblk->rwb);
|
||||
pblk_rwb_free(pblk);
|
||||
pblk_rl_free(&pblk->rl);
|
||||
|
||||
pr_debug("pblk: consistent tear down\n");
|
||||
|
|
Loading…
Reference in a new issue