Skip to content

Commit

Permalink
ocf_cleaner_refcnt_unfreeze bug fix
Browse files Browse the repository at this point in the history
During core remove/detach ocf_cleaner_refcnt_freeze was called only
when cache was attached, but ocf_cleaner_refcnt_unfreeze was called
regardless of cache state.

Signed-off-by: Daniel Madej <[email protected]>
  • Loading branch information
Deixx committed Jan 15, 2025
1 parent e630b81 commit 51b0b19
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mngt/ocf_mngt_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,9 @@ static void ocf_mngt_cache_remove_core_finish(ocf_pipeline_t pipeline,
context->core_name);
}

ocf_cleaner_refcnt_unfreeze(cache);
if (ocf_cache_is_device_attached(cache)) {
ocf_cleaner_refcnt_unfreeze(cache);
}

context->cmpl(context->priv, error);

Expand Down Expand Up @@ -826,7 +828,9 @@ static void ocf_mngt_cache_detach_core_finish(ocf_pipeline_t pipeline,
context->core_name);
}

ocf_cleaner_refcnt_unfreeze(context->cache);
if (ocf_cache_is_device_attached(cache)) {
ocf_cleaner_refcnt_unfreeze(cache);
}

context->cmpl(context->priv, error);

Expand Down

0 comments on commit 51b0b19

Please sign in to comment.