MFC 197772:

When the timeout backoff hits the maximum value, leave it capped at the
maximum value rather than setting it to the result of a boolean expression
that is always true.
This commit is contained in:
John Baldwin 2009-11-04 16:58:26 +00:00
parent 2d7c21427d
commit 6fd3786837
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=198907

View File

@ -456,7 +456,7 @@ lptout(void *arg)
if (sc->sc_state & OPEN) {
sc->sc_backoff++;
if (sc->sc_backoff > hz/LPTOUTMAX)
sc->sc_backoff = sc->sc_backoff > hz/LPTOUTMAX;
sc->sc_backoff = hz/LPTOUTMAX;
callout_reset(&sc->sc_timer, sc->sc_backoff, lptout, sc);
} else
sc->sc_state &= ~TOUT;