diff --git a/src/eviction/lru.c b/src/eviction/lru.c index 6d597cc..965e603 100644 --- a/src/eviction/lru.c +++ b/src/eviction/lru.c @@ -289,10 +289,13 @@ void evp_lru_rm_cline(ocf_cache_t cache, ocf_cache_line_t cline) ENV_BUG_ON(part_id > OCF_USER_IO_CLASS_MAX); part = &cache->user_parts[part_id].part; + OCF_METADATA_EVICTION_WR_LOCK(cline); + list = evp_get_cline_list(cache, cline); free = evp_lru_get_list(&cache->free, ev_list, true); - evp_lru_move(cache, cline, part, list, &cache->free, free); + + OCF_METADATA_EVICTION_WR_UNLOCK(cline); } static void evp_lru_repart_locked(ocf_cache_t cache, ocf_cache_line_t cline, diff --git a/src/eviction/ops.h b/src/eviction/ops.h index 76bec9a..ca6622d 100644 --- a/src/eviction/ops.h +++ b/src/eviction/ops.h @@ -36,9 +36,7 @@ static inline void ocf_eviction_purge_cache_line( ENV_BUG_ON(type >= ocf_eviction_max); if (likely(evict_policy_ops[type].rm_cline)) { - OCF_METADATA_EVICTION_WR_LOCK(line); evict_policy_ops[type].rm_cline(cache, line); - OCF_METADATA_EVICTION_WR_UNLOCK(line); } }