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

@@ -90,7 +90,7 @@ int my_cache_init(void)
{
int result;
result ocf_ctx_init(&ctx, &ctx_ops)
result = ocf_ctx_create(&ctx, &ctx_ops)
if (result) {
/* Cannot initialze context of OCF library */
return result;
@@ -116,7 +116,7 @@ int my_cache_init(void)
err:
/* In case of failure we destroy context and propagate error code */
ocf_ctx_exit(ctx);
ocf_ctx_put(ctx);
return result;
}