It might be marginally cleaner to put all of this into a single inlined function, so that someone reading hazard.c doesn't have to know about the eviction internals.