Skip to content

Commit 0e294fc

Browse files
Merge pull request #859 from Deixx/detach-unfreeze-fix
ocf_cleaner_refcnt_unfreeze bug fix
2 parents e630b81 + 8ce129d commit 0e294fc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/mngt/ocf_mngt_core.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright(c) 2012-2022 Intel Corporation
3-
* Copyright(c) 2024 Huawei Technologies
3+
* Copyright(c) 2024-2025 Huawei Technologies
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
66

@@ -643,7 +643,9 @@ static void ocf_mngt_cache_remove_core_finish(ocf_pipeline_t pipeline,
643643
context->core_name);
644644
}
645645

646-
ocf_cleaner_refcnt_unfreeze(cache);
646+
if (ocf_cache_is_device_attached(cache)) {
647+
ocf_cleaner_refcnt_unfreeze(cache);
648+
}
647649

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

@@ -826,7 +828,9 @@ static void ocf_mngt_cache_detach_core_finish(ocf_pipeline_t pipeline,
826828
context->core_name);
827829
}
828830

829-
ocf_cleaner_refcnt_unfreeze(context->cache);
831+
if (ocf_cache_is_device_attached(cache)) {
832+
ocf_cleaner_refcnt_unfreeze(cache);
833+
}
830834

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

0 commit comments

Comments
 (0)