Decouple cache attached state from metadata refcount state

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2021-08-31 10:23:31 +02:00
parent 9ab4c51dfa
commit 1f6b83f87d

View File

@ -47,7 +47,7 @@ bool ocf_cache_is_running(ocf_cache_t cache)
bool ocf_cache_is_device_attached(ocf_cache_t cache)
{
OCF_CHECK_NULL(cache);
return !ocf_refcnt_frozen(&cache->refcnt.metadata);
return !!cache->device;
}
ocf_cache_mode_t ocf_cache_get_mode(ocf_cache_t cache)