lightnvm: fix memory leak when submit fails
The allocated page is not released if error occurs in nvm_submit_io_sync_raw(). __free_page() is moved ealier to avoid possible memory leak issue. Fixes: aff3fb18 ("lightnvm: move bad block and chunk state logic to core") Signed-off-by: NPan Bian <bianpan2016@163.com> Signed-off-by: NJens Axboe <axboe@kernel.dk>
Showing
想要评论请 注册 或 登录