Call completion if failed to perform cleaning
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
parent
aac21cab63
commit
d6f2998890
@ -256,18 +256,22 @@ static inline void ocf_cleaning_perform_cleaning(ocf_cache_t cache,
|
|||||||
{
|
{
|
||||||
ocf_cleaning_t policy;
|
ocf_cleaning_t policy;
|
||||||
|
|
||||||
if (unlikely(!ocf_refcnt_inc(&cache->cleaner.refcnt)))
|
if (unlikely(!ocf_refcnt_inc(&cache->cleaner.refcnt))) {
|
||||||
|
cmpl(&cache->cleaner, 1000);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
policy = cache->cleaner.policy;
|
policy = cache->cleaner.policy;
|
||||||
ENV_BUG_ON(policy >= ocf_cleaning_max);
|
ENV_BUG_ON(policy >= ocf_cleaning_max);
|
||||||
|
|
||||||
if (unlikely(!cleaning_policy_ops[policy].perform_cleaning))
|
if (unlikely(!cleaning_policy_ops[policy].perform_cleaning)) {
|
||||||
goto unlock;
|
ocf_refcnt_dec(&cache->cleaner.refcnt);
|
||||||
|
cmpl(&cache->cleaner, 1000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
cleaning_policy_ops[policy].perform_cleaning(cache, cmpl);
|
cleaning_policy_ops[policy].perform_cleaning(cache, cmpl);
|
||||||
|
|
||||||
unlock:
|
|
||||||
ocf_refcnt_dec(&cache->cleaner.refcnt);
|
ocf_refcnt_dec(&cache->cleaner.refcnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user