mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 00:10:09 +00:00
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: 090ee26fd5
("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>
This commit is contained in:
parent
f9324980d7
commit
6916cf5426
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
ret = nvm_get_chunk_meta(dev, ppa, geo->all_chunks, meta);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
kfree(meta);
|
vfree(meta);
|
||||||
return ERR_PTR(-EIO);
|
return ERR_PTR(-EIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue