Remove redundant cache being stopped check

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk 2021-03-12 09:18:06 +01:00
parent 66f30dcf12
commit 12db6b4443
3 changed files with 0 additions and 23 deletions

View File

@ -253,11 +253,6 @@ struct {
"Waiting for operation interrupted"
},
{
KCAS_ERR_CACHE_STOPPING,
"Cache being stopped"
},
{
KCAS_ERR_CORE_IN_ACTIVE_STATE,
"Core device is in active state"
},

View File

@ -98,13 +98,6 @@ static int _cache_mngt_lock_sync(ocf_cache_t cache)
struct _cache_mngt_async_context *context;
int result;
if (!ocf_cache_is_running(cache)) {
printk(KERN_WARNING "%s is being stopped. "
"Can't perform management operations\n",
ocf_cache_get_name(cache));
return -KCAS_ERR_CACHE_STOPPING;
}
context = kmalloc(sizeof(*context), GFP_KERNEL);
if (!context)
return -ENOMEM;
@ -142,13 +135,6 @@ static int _cache_mngt_read_lock_sync(ocf_cache_t cache)
struct _cache_mngt_async_context *context;
int result;
if (!ocf_cache_is_running(cache)) {
printk(KERN_WARNING "%s is being stopped. "
"Can't perform management operations\n",
ocf_cache_get_name(cache));
return -KCAS_ERR_CACHE_STOPPING;
}
context = kmalloc(sizeof(*context), GFP_KERNEL);
if (!context)
return -ENOMEM;
@ -2432,7 +2418,6 @@ int cache_mngt_exit_instance(const char *cache_name, size_t name_len, int flush)
case -OCF_ERR_CACHE_IN_INCOMPLETE_STATE:
case -OCF_ERR_FLUSHING_INTERRUPTED:
case -KCAS_ERR_WAITING_INTERRUPTED:
case -KCAS_ERR_CACHE_STOPPING:
goto put;
default:
flush_status = status;

View File

@ -598,9 +598,6 @@ enum kcas_error {
/** Waiting for async operation was interrupted */
KCAS_ERR_WAITING_INTERRUPTED,
/** Cache already being stopped*/
KCAS_ERR_CACHE_STOPPING,
/** Core device is in active state */
KCAS_ERR_CORE_IN_ACTIVE_STATE
};