diff --git a/inc/ocf_err.h b/inc/ocf_err.h index 2a79c91..f56caed 100644 --- a/inc/ocf_err.h +++ b/inc/ocf_err.h @@ -42,9 +42,6 @@ typedef enum { /** Start cache failure */ OCF_ERR_START_CACHE_FAIL, - /** Cache is busy */ - OCF_ERR_CACHE_IN_USE, - /** Cache ID does not exist */ OCF_ERR_CACHE_NOT_EXIST, diff --git a/inc/ocf_mngt.h b/inc/ocf_mngt.h index b44c0d3..c82ee2c 100644 --- a/inc/ocf_mngt.h +++ b/inc/ocf_mngt.h @@ -163,7 +163,6 @@ void ocf_mngt_cache_read_lock(ocf_cache_t cache, * @retval 0 Cache successfully locked * @retval -OCF_ERR_CACHE_NOT_EXIST Can not lock cache - cache is already * stopping - * @retval -OCF_ERR_CACHE_IN_USE Can not lock cache - cache is in use * @retval -OCF_ERR_NO_LOCK Lock not acquired */ int ocf_mngt_cache_trylock(ocf_cache_t cache); @@ -178,7 +177,6 @@ int ocf_mngt_cache_trylock(ocf_cache_t cache); * @retval 0 Cache successfully locked * @retval -OCF_ERR_CACHE_NOT_EXIST Can not lock cache - cache is already * stopping - * @retval -OCF_ERR_CACHE_IN_USE Can not lock cache - cache is in use * @retval -OCF_ERR_NO_LOCK Lock not acquired */ int ocf_mngt_cache_read_trylock(ocf_cache_t cache); diff --git a/src/mngt/ocf_mngt_common.c b/src/mngt/ocf_mngt_common.c index 44afe06..411a2e5 100644 --- a/src/mngt/ocf_mngt_common.c +++ b/src/mngt/ocf_mngt_common.c @@ -270,14 +270,8 @@ static void _ocf_mngt_cache_unlock(ocf_cache_t cache, int ocf_mngt_cache_lock_init(ocf_cache_t cache) { - int result; - - result = ocf_async_lock_init(&cache->lock, + return ocf_async_lock_init(&cache->lock, sizeof(struct ocf_mngt_cache_lock_context)); - if (result) - return result; - - return 0; } void ocf_mngt_cache_lock_deinit(ocf_cache_t cache) diff --git a/tests/functional/pyocf/types/shared.py b/tests/functional/pyocf/types/shared.py index b23a2fa..356bceb 100644 --- a/tests/functional/pyocf/types/shared.py +++ b/tests/functional/pyocf/types/shared.py @@ -21,7 +21,6 @@ class OcfErrorCode(IntEnum): OCF_ERR_TOO_MANY_CACHES = auto() OCF_ERR_NO_FREE_RAM = auto() OCF_ERR_START_CACHE_FAIL = auto() - OCF_ERR_CACHE_IN_USE = auto() OCF_ERR_CACHE_NOT_EXIST = auto() OCF_ERR_CACHE_EXIST = auto() OCF_ERR_TOO_MANY_CORES = auto()