From 62307d82b87d45e1464bcaf4428cd406d41c0909 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Wed, 26 Mar 2025 10:57:16 +0100 Subject: [PATCH] Don't destroy stop pipeline if detach cache failed Signed-off-by: Michal Mielewczyk --- src/mngt/ocf_mngt_cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mngt/ocf_mngt_cache.c b/src/mngt/ocf_mngt_cache.c index 145d333..20e3fd4 100644 --- a/src/mngt/ocf_mngt_cache.c +++ b/src/mngt/ocf_mngt_cache.c @@ -3860,14 +3860,14 @@ static void ocf_mngt_cache_detach_finish(ocf_pipeline_t pipeline, } _ocf_mngt_cache_set_detached(cache); + + ocf_pipeline_destroy(cache->stop_pipeline); + cache->stop_pipeline = NULL; } else { ocf_cache_log(cache, log_err, "Detaching device failed\n"); } - ocf_pipeline_destroy(cache->stop_pipeline); - cache->stop_pipeline = NULL; - context->cmpl(cache, context->priv, error ?: context->cache_write_error);