Moved setting ctx for temporary cache object before metadata init
This way debug prints during metadata init phase won't cause crash (because of the fact that temporary cache object does not have proper ctx set hence does not have logger obj). Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
This commit is contained in:
parent
ce28c71475
commit
65756a8160
@ -1206,6 +1206,7 @@ static int _ocf_mngt_cache_start(ocf_ctx_t ctx, ocf_cache_t *cache,
|
||||
}
|
||||
|
||||
tmp_cache = params.cache;
|
||||
tmp_cache->owner = ctx;
|
||||
|
||||
/*
|
||||
* Initialize metadata selected segments of metadata in memory
|
||||
@ -1218,8 +1219,6 @@ static int _ocf_mngt_cache_start(ocf_ctx_t ctx, ocf_cache_t *cache,
|
||||
}
|
||||
params.flags.metadata_inited = true;
|
||||
|
||||
tmp_cache->owner = ctx;
|
||||
|
||||
result = ocf_cache_set_name(tmp_cache, cfg->name, OCF_CACHE_NAME_SIZE);
|
||||
if (result) {
|
||||
env_rmutex_unlock(&ctx->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user