提交 7e5434ee 编写于 作者: I Igor Konopko 提交者: Jens Axboe

lightnvm: pblk: line reference fix in GC

Fixes the GC error case when moving a line back to closed state
while releasing additional references.
Signed-off-by: NIgor Konopko <igor.j.konopko@intel.com>
Reviewed-by: NHans Holmberg <hans.holmberg@cnexlabs.com>
Reviewed-by: NJavier González <javier@javigon.com>
Signed-off-by: NMatias Bjørling <mb@lightnvm.io>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 66215664
......@@ -290,8 +290,11 @@ static void pblk_gc_line_prepare_ws(struct work_struct *work)
fail_free_ws:
kfree(line_ws);
/* Line goes back to closed state, so we cannot release additional
* reference for line, since we do that only when we want to do
* gc to free line state transition.
*/
pblk_put_line_back(pblk, line);
kref_put(&line->ref, pblk_line_put);
atomic_dec(&gc->read_inflight_gc);
pblk_err(pblk, "failed to GC line %d\n", line->id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册