Adding synchronization primitives destroyers
Environment should provide calls for destroying primitives (i.e. env_mutex_destroy()) and OCF should call these functions in its cleanup paths. Signed-off-by: Firas Medini <mdnfiras@yahoo.com>
This commit is contained in:
@@ -73,6 +73,8 @@ void ocf_metadata_deinit(struct ocf_cache *cache)
|
||||
cache->metadata.iface.deinit(cache);
|
||||
}
|
||||
|
||||
ocf_metadata_concurrency_deinit(cache);
|
||||
|
||||
ocf_metadata_io_deinit(cache);
|
||||
}
|
||||
|
||||
|
@@ -129,6 +129,8 @@ int raw_dynamic_deinit(ocf_cache_t cache,
|
||||
for (i = 0; i < raw->ssd_pages; i++)
|
||||
env_secure_free(ctrl->pages[i], PAGE_SIZE);
|
||||
|
||||
env_mutex_destroy(&ctrl->lock);
|
||||
|
||||
env_vfree(ctrl);
|
||||
raw->priv = NULL;
|
||||
|
||||
|
@@ -33,6 +33,7 @@ void ocf_metadata_updater_kick(ocf_cache_t cache)
|
||||
void ocf_metadata_updater_stop(ocf_cache_t cache)
|
||||
{
|
||||
ctx_metadata_updater_stop(cache->owner, &cache->metadata_updater);
|
||||
env_mutex_destroy(&cache->metadata_updater.syncher.lock);
|
||||
}
|
||||
|
||||
void ocf_metadata_updater_set_priv(ocf_metadata_updater_t mu, void *priv)
|
||||
|
Reference in New Issue
Block a user