Remove redundant cache being stopped
check
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
parent
66f30dcf12
commit
12db6b4443
@ -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"
|
||||
},
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user