Clear hot flag when removing node from LRU list

This isn't strictly required in current implementation as
nodes are always re-initialized before inserting to LRU list.
However it seems to make sense to zero the flag anyway to
make the code easier to reason about.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2021-03-26 07:22:34 -05:00
parent b12e124954
commit b87008dc67

View File

@ -170,6 +170,7 @@ static void remove_lru_list(ocf_cache_t cache,
node->prev = end_marker;
}
node->hot = false;
--list->num_nodes;
}