Merge pull request #165 from robertbaldyga/ctx-get-put

Give ocf_ctx get/put semantics
This commit is contained in:
Jan Musiał
2019-05-24 14:29:04 +02:00
committed by GitHub
8 changed files with 42 additions and 28 deletions

View File

@@ -278,13 +278,13 @@ int ctx_init(ocf_ctx_t *ctx)
{
int ret;
ret = ocf_ctx_init(ctx, &ctx_cfg);
ret = ocf_ctx_create(ctx, &ctx_cfg);
if (ret)
return ret;
ret = volume_init(*ctx);
if (ret) {
ocf_ctx_exit(*ctx);
ocf_ctx_put(*ctx);
return ret;
}
@@ -298,5 +298,5 @@ int ctx_init(ocf_ctx_t *ctx)
void ctx_cleanup(ocf_ctx_t ctx)
{
volume_cleanup(ctx);
ocf_ctx_exit(ctx);
ocf_ctx_put(ctx);
}