Added missing metadata_unlock

Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
This commit is contained in:
Michal Rakowski 2019-06-11 09:10:46 +02:00
parent 4789fb38f0
commit 29199cb5d4

View File

@ -505,6 +505,7 @@ static void _ocf_mngt_flush_core(
ocf_core_log(core, log_err, "Flushing operation aborted, "
"no memory\n");
env_vfree(fc);
ocf_metadata_unlock(cache, OCF_METADATA_WR);
complete(context, -OCF_ERR_NO_MEM);
return;
}
@ -540,6 +541,7 @@ static void _ocf_mngt_flush_all_cores(
if (ret) {
ocf_cache_log(cache, log_err, "Flushing operation aborted, "
"no memory\n");
ocf_metadata_unlock(cache, OCF_METADATA_WR);
complete(context, ret);
return;
}