lightnvm: pblk: free metadata on line alloc failure
authorJavier González <jg@lightnvm.io>
Fri, 21 Apr 2017 23:32:48 +0000 (01:32 +0200)
committerJens Axboe <axboe@fb.com>
Sun, 23 Apr 2017 22:57:52 +0000 (16:57 -0600)
commitbe388d9fbd4e09582e31c3ee82a022e368208ae3
tree7cd48c6139b78fb22d9a27cc4d49a4aa6af0e34b
parent33db9fd46ea8e3e6d4757d99a3f97bd1a0c919f3
lightnvm: pblk: free metadata on line alloc failure

When a line allocation fails, for example, due to having too many bad
blocks, free its metadata correctly.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González <javier@cnexlabs.com>
Reviewed-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/pblk-core.c