Add getter function for cache->device->concurrency.cache_line
The purpose of this change is to facilitate unit testing. Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
@@ -44,8 +44,7 @@ static void __set_cache_line_invalid(struct ocf_cache *cache, uint8_t start_bit,
|
||||
* only valid bits
|
||||
*/
|
||||
if (!is_valid && !ocf_cache_line_are_waiters(
|
||||
cache->device->concurrency.cache_line,
|
||||
line)) {
|
||||
ocf_cache_line_concurrency(cache), line)) {
|
||||
ocf_purge_eviction_policy(cache, line);
|
||||
ocf_metadata_remove_cache_line(cache, line);
|
||||
}
|
||||
|
@@ -213,8 +213,7 @@ static int _ocf_cleaner_cache_line_lock(struct ocf_request *req)
|
||||
|
||||
OCF_DEBUG_TRACE(req->cache);
|
||||
|
||||
return ocf_req_async_lock_rd(
|
||||
req->cache->device->concurrency.cache_line,
|
||||
return ocf_req_async_lock_rd(ocf_cache_line_concurrency(req->cache),
|
||||
req, _ocf_cleaner_on_resume);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user