With the old code, if more than VUID_CACHE_SIZE elements were used all new
entries ended up in slot 0. With this checkin we do cycle.
Jeremy, please revert if the old behaviour was intentional
(This used to be commit
50c891d3dfb75c9f607f7ad2a578aa3ba5d91988)
return False;
}
- i = conn->vuid_cache.entries % VUID_CACHE_SIZE;
- if (conn->vuid_cache.entries < VUID_CACHE_SIZE)
- conn->vuid_cache.entries++;
+ i = conn->vuid_cache.entries;
+ conn->vuid_cache.entries =
+ (conn->vuid_cache.entries + 1) % VUID_CACHE_SIZE;
ent = &conn->vuid_cache.array[i];
ent->vuid = vuser->vuid;