Date: Wed, 5 Jun 2019 13:41:10 +0200 From: Sebastian Huber <sebastian.huber@embedded-brains.de> To: freebsd-hackers@freebsd.org Subject: [PATCH] if_lagg: Add INVARIANTS condition Message-ID: <20190605114110.30467-1-sebastian.huber@embedded-brains.de>
next in thread | raw e-mail | index | archive | help
There is no need to call in_epoch() in case INVARIANTS is not defined. --- sys/net/if_lagg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 1a4d1d302ec..3e1cb2043b0 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1955,12 +1955,14 @@ lagg_link_active(struct lagg_softc *sc, struct lagg_port *lp) * Search a port which reports an active link state. */ +#ifdef INVARIANTS /* * This is called with either LAGG_RLOCK() held or * LAGG_XLOCK(sc) held. */ if (!in_epoch(net_epoch_preempt)) LAGG_XLOCK_ASSERT(sc); +#endif if (lp == NULL) goto search; -- 2.16.4
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190605114110.30467-1-sebastian.huber>