Unlock cachelines after failed remap

All remapped cachelines are write locked. If the operation fails cachelines has
to be unlocked during rollback

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk 2021-07-06 14:00:54 +02:00
parent f863bb627f
commit a394dd06a8

View File

@ -328,6 +328,7 @@ static void ocf_engine_map_hndl_error(struct ocf_cache *cache,
{
uint32_t i;
struct ocf_map_info *entry;
struct ocf_alock *alock = ocf_cache_line_concurrency(req->cache);
for (i = 0; i < req->core_line_count; i++) {
entry = &(req->map[i]);
@ -352,6 +353,10 @@ static void ocf_engine_map_hndl_error(struct ocf_cache *cache,
ocf_metadata_end_collision_shared_access(cache,
entry->coll_idx);
ocf_alock_mark_index_locked(alock, req, i, false);
ocf_cache_line_unlock_wr(alock, entry->coll_idx);
break;
default: