Fix discard step callback refcount

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Rafal Stefanowski 2024-02-01 16:56:56 +01:00 committed by Michal Mielewczyk
parent 070b16b31f
commit 7dfe70f69b

View File

@ -156,6 +156,8 @@ static int _ocf_discard_step_do(struct ocf_request *req)
ocf_hb_req_prot_unlock_wr(req);
if (req->info.flush_metadata) {
env_atomic_inc(&req->req_remaining);
/* Request was dirty and need to flush metadata */
ocf_metadata_flush_do_asynch(cache, req,
_ocf_discard_step_complete);