do {
if (SCMutexTrylock(&dt->lock) != 0) {
- dt = dt->hprev;
+ dt = dt->hnext;
continue;
}
- DefragTracker *next_dt = dt->hprev;
+ DefragTracker *next_dt = dt->hnext;
/* check if the tracker is fully timed out and
* ready to be discarded. */
/* defrag hash bucket is now locked */
- if (hb->tail == NULL) {
+ if (hb->head == NULL) {
DRLOCK_UNLOCK(hb);
continue;
}
/* we have a tracker, or more than one */
- cnt += DefragTrackerHashRowTimeout(hb, hb->tail, ts);
+ cnt += DefragTrackerHashRowTimeout(hb, hb->head, ts);
DRLOCK_UNLOCK(hb);
}