diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-03-17 17:06:26 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-03-17 17:06:26 +0000 |
commit | 97968578fca98adc82352fa265539848765983c7 (patch) | |
tree | b2cb66e0cca5d90f1a2f3b728a36e8fb3c9de79d /sys/netinet/ip_carp.c | |
parent | 64e7a6c11d4abadcbf6c4192f56d816cb25d0a55 (diff) |
carp(4) code is always executed in the 'softnet' thread, so remove
unneeded splnet()/splx() dance.
ok mikeb@, bluhm@
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 15469644510..eddc1cbb24d 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.302 2017/02/20 06:29:42 jca Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.303 2017/03/17 17:06:25 mpi Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -898,7 +898,6 @@ carpdetach(struct carp_softc *sc) { struct ifnet *ifp0; struct carp_if *cif; - int s; carp_del_all_timeouts(sc); @@ -926,7 +925,6 @@ carpdetach(struct carp_softc *sc) /* Restore previous input handler. */ if_ih_remove(ifp0, carp_input, cif); - s = splnet(); if (sc->lh_cookie != NULL) hook_disestablish(ifp0->if_linkstatehooks, sc->lh_cookie); @@ -938,7 +936,6 @@ carpdetach(struct carp_softc *sc) free(cif, M_IFADDR, sizeof(*cif)); } sc->sc_carpdev = NULL; - splx(s); } /* Detach an interface from the carp. */ @@ -1680,7 +1677,6 @@ carp_set_ifp(struct carp_softc *sc, struct ifnet *ifp0) struct carp_if *cif, *ncif = NULL; struct carp_softc *vr, *last = NULL, *after = NULL; int myself = 0, error = 0; - int s; KASSERT(ifp0 != sc->sc_carpdev); KERNEL_ASSERT_LOCKED(); /* touching vhif_vrs */ @@ -1754,9 +1750,7 @@ carp_set_ifp(struct carp_softc *sc, struct ifnet *ifp0) /* Change input handler of the physical interface. */ if_ih_insert(ifp0, carp_input, cif); - s = splnet(); carp_carpdev_state(ifp0); - splx(s); return (0); } |