Merge pull request #86 from Donaim/delay-put-cache
Put cache after doing pipeline_destroy
This commit is contained in:
commit
08a5b9d2a4
@ -2068,11 +2068,8 @@ static void ocf_mngt_cache_stop_finish(ocf_pipeline_t pipeline,
|
||||
cache->valid_ocf_cache_device_t = 0;
|
||||
/* Remove cache from the list */
|
||||
list_del(&cache->list);
|
||||
/* Finally release cache instance */
|
||||
ocf_mngt_cache_put(cache);
|
||||
env_mutex_unlock(&ctx->lock);
|
||||
|
||||
|
||||
if (context->error == -OCF_ERR_WRITE_CACHE) {
|
||||
ocf_log(ctx, log_warn, "Stopped cache %s with errors\n",
|
||||
context->cache_name);
|
||||
@ -2087,6 +2084,9 @@ static void ocf_mngt_cache_stop_finish(ocf_pipeline_t pipeline,
|
||||
context->cmpl(cache, context->priv, context->error);
|
||||
|
||||
ocf_pipeline_destroy(context->pipeline);
|
||||
|
||||
/* Finally release cache instance */
|
||||
ocf_mngt_cache_put(cache);
|
||||
}
|
||||
|
||||
struct ocf_pipeline_properties ocf_mngt_cache_stop_pipeline_properties = {
|
||||
|
Loading…
Reference in New Issue
Block a user