Skip to content

Commit

Permalink
lightnvm: pblk: use vfree to free metadata on error path
Browse files Browse the repository at this point in the history
As chunk metadata is allocated using vmalloc, we need to free it
using vfree.

Fixes: 090ee26 ("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>
  • Loading branch information
Hans Holmberg authored and Jens Axboe committed Feb 11, 2019
1 parent f932498 commit 6916cf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/lightnvm/pblk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 6916cf5

Please sign in to comment.