diff options
author | Hans Holmberg <hans.holmberg@cnexlabs.com> | 2019-02-11 13:25:03 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-02-11 16:18:07 +0100 |
commit | 6916cf5426d08ea8be50ab4ba7ff86ea022cdff3 (patch) | |
tree | 7bdbb122c8415ac097d00a1a5a8e38cbd5b572ef /drivers/lightnvm | |
parent | lightnvm: pblk: stop taking the free lock in in pblk_lines_free (diff) | |
download | linux-6916cf5426d08ea8be50ab4ba7ff86ea022cdff3.tar.xz linux-6916cf5426d08ea8be50ab4ba7ff86ea022cdff3.zip |
lightnvm: pblk: use vfree to free metadata on error path
As chunk metadata is allocated using vmalloc, we need to free it
using vfree.
Fixes: 090ee26fd512 ("lightnvm: use internal allocation for chunk log page")
Signed-off-by: Hans Holmberg <hans.holmberg@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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 1ff165351180..1b5ff51faa63 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -141,7 +141,7 @@ struct nvm_chk_meta *pblk_get_chunk_meta(struct pblk *pblk) ret = nvm_get_chunk_meta(dev, ppa, geo->all_chunks, meta); if (ret) { - kfree(meta); + vfree(meta); return ERR_PTR(-EIO); } |