Conditionalize an in_epoch() call on INVARIANTS.

Its result is only used to determine whether to perform further
INVARIANTS-only checks.  Remove a stale comment while here.

Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after:	1 week
This commit is contained in:
markj 2019-06-06 16:22:29 +00:00
parent 8393cc2acf
commit 48b8f5d1ba

View File

@ -1955,12 +1955,10 @@ lagg_link_active(struct lagg_softc *sc, struct lagg_port *lp)
* Search a port which reports an active link state.
*/
/*
* This is called with either LAGG_RLOCK() held or
* LAGG_XLOCK(sc) held.
*/
#ifdef INVARIANTS
if (!in_epoch(net_epoch_preempt))
LAGG_XLOCK_ASSERT(sc);
#endif
if (lp == NULL)
goto search;