summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2019-04-15 03:26:56 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2019-04-15 03:26:56 +0000
commit96f6aa132e9fbba2df853d5b2fe58e728cdfbae8 (patch)
treeb7e743bc635cfc78ef11668965ef59403c1a4af1 /sys/net
parentdbb3247b430fa9ffa7527a2b761144d064dd1955 (diff)
Use timeout_del_barrier(9) instead of timeout_del(9) followed by
conditional timeout_barrier(9). OK kn@ dlg@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_bridge.c5
-rw-r--r--sys/net/if_gre.c17
2 files changed, 8 insertions, 14 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 8f0260870f1..a1ba46f8581 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.326 2019/03/31 13:59:38 mpi Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.327 2019/04/15 03:26:55 visa Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -692,8 +692,7 @@ bridge_stop(struct bridge_softc *sc)
CLR(ifp->if_flags, IFF_RUNNING);
- if (!timeout_del(&sc->sc_brtimeout))
- timeout_barrier(&sc->sc_brtimeout);
+ timeout_del_barrier(&sc->sc_brtimeout);
bridge_rtflush(sc, IFBF_FLUSHDYN);
}
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 550672c03df..5521e683fe4 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.145 2019/01/04 11:16:03 benno Exp $ */
+/* $OpenBSD: if_gre.c,v 1.146 2019/04/15 03:26:55 visa Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -3018,10 +3018,8 @@ gre_down(struct gre_softc *sc)
CLR(sc->sc_if.if_flags, IFF_RUNNING);
if (sc->sc_ka_state != GRE_KA_NONE) {
- if (!timeout_del(&sc->sc_ka_hold))
- timeout_barrier(&sc->sc_ka_hold);
- if (!timeout_del(&sc->sc_ka_send))
- timeout_barrier(&sc->sc_ka_send);
+ timeout_del_barrier(&sc->sc_ka_hold);
+ timeout_del_barrier(&sc->sc_ka_send);
sc->sc_ka_state = GRE_KA_DOWN;
gre_link_state(&sc->sc_if, sc->sc_ka_state);
@@ -3617,8 +3615,7 @@ nvgre_down(struct nvgre_softc *sc)
CLR(ifp->if_flags, IFF_RUNNING);
NET_UNLOCK();
- if (!timeout_del(&sc->sc_ether_age))
- timeout_barrier(&sc->sc_ether_age);
+ timeout_del_barrier(&sc->sc_ether_age);
ifq_barrier(&ifp->if_snd);
if (!task_del(softnet, &sc->sc_send_task))
taskq_barrier(softnet);
@@ -3924,10 +3921,8 @@ eoip_down(struct eoip_softc *sc)
CLR(sc->sc_ac.ac_if.if_flags, IFF_RUNNING);
if (sc->sc_ka_state != GRE_KA_NONE) {
- if (!timeout_del(&sc->sc_ka_hold))
- timeout_barrier(&sc->sc_ka_hold);
- if (!timeout_del(&sc->sc_ka_send))
- timeout_barrier(&sc->sc_ka_send);
+ timeout_del_barrier(&sc->sc_ka_hold);
+ timeout_del_barrier(&sc->sc_ka_send);
sc->sc_ka_state = GRE_KA_DOWN;
gre_link_state(&sc->sc_ac.ac_if, sc->sc_ka_state);