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
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user