Use new functions for creating and destroying ocf_ctx

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2019-05-22 16:33:40 +02:00
parent 077956f9a9
commit 00dae3bd2f
3 changed files with 6 additions and 6 deletions

View File

@ -394,7 +394,7 @@ int cas_initialize_context(void)
struct blk_data data; struct blk_data data;
int ret; int ret;
ret = ocf_ctx_init(&cas_ctx, &ctx_cfg); ret = ocf_ctx_create(&cas_ctx, &ctx_cfg);
if (ret < 0) if (ret < 0)
return ret; return ret;
@ -441,12 +441,12 @@ err_rpool:
err_mpool: err_mpool:
ocf_mpool_destroy(cas_bvec_pool); ocf_mpool_destroy(cas_bvec_pool);
err_ctx: err_ctx:
ocf_ctx_exit(cas_ctx); ocf_ctx_put(cas_ctx);
return ret; return ret;
} }
int cas_cleanup_context(void) void cas_cleanup_context(void)
{ {
block_dev_deinit(); block_dev_deinit();
atomic_dev_deinit(); atomic_dev_deinit();
@ -454,7 +454,7 @@ int cas_cleanup_context(void)
ocf_mpool_destroy(cas_bvec_pool); ocf_mpool_destroy(cas_bvec_pool);
cas_rpool_destroy(cas_bvec_pages_rpool, _cas_free_page_rpool, NULL); cas_rpool_destroy(cas_bvec_pages_rpool, _cas_free_page_rpool, NULL);
return ocf_ctx_exit(cas_ctx); ocf_ctx_put(cas_ctx);
} }
/* *** CONTEXT DATA HELPER FUNCTION *** */ /* *** CONTEXT DATA HELPER FUNCTION *** */

View File

@ -74,6 +74,6 @@ void cas_ctx_data_free(ctx_data_t *ctx_data);
void cas_ctx_data_secure_erase(ctx_data_t *ctx_data); void cas_ctx_data_secure_erase(ctx_data_t *ctx_data);
int cas_initialize_context(void); int cas_initialize_context(void);
int cas_cleanup_context(void); void cas_cleanup_context(void);
#endif /* __CONTEXT_H__ */ #endif /* __CONTEXT_H__ */

2
ocf

@ -1 +1 @@
Subproject commit 7d493ae995c3706fe8466f9a5f5c53f6a03401bd Subproject commit 93a06686a7e2285b674b760c6360a7577556b8c7