Give ocf_ctx get/put semantics

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2019-05-22 16:29:42 +02:00
parent 76bcac5b45
commit c903d13ad2
8 changed files with 42 additions and 28 deletions

View File

@@ -269,13 +269,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;
}
@@ -289,5 +289,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);
}