/* Used to initialize the active set to some previously recorded state.  */
void lc_set(struct lru_cache *lc, unsigned int enr, int index)
/* Used to initialize the active set to some previously recorded state.  */
void lc_set(struct lru_cache *lc, unsigned int enr, int index)
{
	struct lc_element *e;
	if (index < 0 || index >= lc->nr_elements)
		return;
	e = lc_element_by_index(lc, index);
	e->lc_number = enr;
	hlist_del_init(&e->colision);
	hlist_add_head(&e->colision, lc_hash_slot(lc, enr));
	list_move(&e->list, e->refcnt ? &lc->in_use : &lc->lru);
}