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:
@@ -233,8 +233,13 @@ void cleaning_policy_acp_init_cache_block(struct ocf_cache *cache,
|
||||
|
||||
void cleaning_policy_acp_deinitialize(struct ocf_cache *cache)
|
||||
{
|
||||
struct acp_context *acp;
|
||||
|
||||
_acp_remove_cores(cache);
|
||||
|
||||
acp = cache->cleaner.cleaning_policy_context;
|
||||
env_rwsem_destroy(&acp->chunks_lock);
|
||||
|
||||
env_vfree(cache->cleaner.cleaning_policy_context);
|
||||
cache->cleaner.cleaning_policy_context = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user