From 6d9882d3c088cc60eb554c8d1a14b6a319f09e04 Mon Sep 17 00:00:00 2001 From: thompsa Date: Thu, 17 Aug 2006 11:16:02 +0000 Subject: [PATCH] Remove unneeded asserts from bridge_ioctl_* since these are just extensions of bridge_ioctl() which has the correct locking. --- sys/net/if_bridge.c | 64 --------------------------------------------- 1 file changed, 64 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 556958e06856..c55ace868ba4 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -895,8 +895,6 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) struct ifnet *ifs; int error = 0; - BRIDGE_LOCK_ASSERT(sc); - ifs = ifunit(req->ifbr_ifsname); if (ifs == NULL) return (ENOENT); @@ -973,8 +971,6 @@ bridge_ioctl_del(struct bridge_softc *sc, void *arg) struct ifbreq *req = arg; struct bridge_iflist *bif; - BRIDGE_LOCK_ASSERT(sc); - bif = bridge_lookup_member(sc, req->ifbr_ifsname); if (bif == NULL) return (ENOENT); @@ -990,8 +986,6 @@ bridge_ioctl_gifflags(struct bridge_softc *sc, void *arg) struct ifbreq *req = arg; struct bridge_iflist *bif; - BRIDGE_LOCK_ASSERT(sc); - bif = bridge_lookup_member(sc, req->ifbr_ifsname); if (bif == NULL) return (ENOENT); @@ -1012,8 +1006,6 @@ bridge_ioctl_sifflags(struct bridge_softc *sc, void *arg) struct bridge_iflist *bif; int error; - BRIDGE_LOCK_ASSERT(sc); - bif = bridge_lookup_member(sc, req->ifbr_ifsname); if (bif == NULL) return (ENOENT); @@ -1044,8 +1036,6 @@ bridge_ioctl_scache(struct bridge_softc *sc, void *arg) { struct ifbrparam *param = arg; - BRIDGE_LOCK_ASSERT(sc); - sc->sc_brtmax = param->ifbrp_csize; bridge_rttrim(sc); @@ -1057,8 +1047,6 @@ bridge_ioctl_gcache(struct bridge_softc *sc, void *arg) { struct ifbrparam *param = arg; - BRIDGE_LOCK_ASSERT(sc); - param->ifbrp_csize = sc->sc_brtmax; return (0); @@ -1072,8 +1060,6 @@ bridge_ioctl_gifs(struct bridge_softc *sc, void *arg) struct ifbreq breq; int count, len, error = 0; - BRIDGE_LOCK_ASSERT(sc); - count = 0; LIST_FOREACH(bif, &sc->sc_iflist, bif_next) count++; @@ -1135,8 +1121,6 @@ bridge_ioctl_rts(struct bridge_softc *sc, void *arg) struct ifbareq bareq; int count = 0, error = 0, len; - BRIDGE_LOCK_ASSERT(sc); - if (bac->ifbac_len == 0) return (0); @@ -1173,8 +1157,6 @@ bridge_ioctl_saddr(struct bridge_softc *sc, void *arg) struct bridge_iflist *bif; int error; - BRIDGE_LOCK_ASSERT(sc); - bif = bridge_lookup_member(sc, req->ifba_ifsname); if (bif == NULL) return (ENOENT); @@ -1190,10 +1172,7 @@ bridge_ioctl_sto(struct bridge_softc *sc, void *arg) { struct ifbrparam *param = arg; - BRIDGE_LOCK_ASSERT(sc); - sc->sc_brttimeout = param->ifbrp_ctime; - return (0); } @@ -1202,10 +1181,7 @@ bridge_ioctl_gto(struct bridge_softc *sc, void *arg) { struct ifbrparam *param = arg; - BRIDGE_LOCK_ASSERT(sc); - param->ifbrp_ctime = sc->sc_brttimeout; - return (0); } @@ -1214,8 +1190,6 @@ bridge_ioctl_daddr(struct bridge_softc *sc, void *arg) { struct ifbareq *req = arg; - BRIDGE_LOCK_ASSERT(sc); - return (bridge_rtdaddr(sc, req->ifba_dst)); } @@ -1224,10 +1198,7 @@ bridge_ioctl_flush(struct bridge_softc *sc, void *arg) { struct ifbreq *req = arg; - BRIDGE_LOCK_ASSERT(sc); - bridge_rtflush(sc, req->ifbr_ifsflags); - return (0); } @@ -1237,10 +1208,7 @@ bridge_ioctl_gpri(struct bridge_softc *sc, void *arg) struct ifbrparam *param = arg; struct bstp_state *bs = &sc->sc_stp; - BRIDGE_LOCK_ASSERT(sc); - param->ifbrp_prio = bs->bs_bridge_priority; - return (0); } @@ -1250,8 +1218,6 @@ bridge_ioctl_spri(struct bridge_softc *sc, void *arg) struct ifbrparam *param = arg; struct bstp_state *bs = &sc->sc_stp; - BRIDGE_LOCK_ASSERT(sc); - bs->bs_bridge_priority = param->ifbrp_prio; bstp_reinit(bs); @@ -1264,10 +1230,7 @@ bridge_ioctl_ght(struct bridge_softc *sc, void *arg) struct ifbrparam *param = arg; struct bstp_state *bs = &sc->sc_stp; - BRIDGE_LOCK_ASSERT(sc); - param->ifbrp_hellotime = bs->bs_bridge_hello_time >> 8; - return (0); } @@ -1277,8 +1240,6 @@ bridge_ioctl_sht(struct bridge_softc *sc, void *arg) struct ifbrparam *param = arg; struct bstp_state *bs = &sc->sc_stp; - BRIDGE_LOCK_ASSERT(sc); - if (param->ifbrp_hellotime == 0) return (EINVAL); bs->bs_bridge_hello_time = param->ifbrp_hellotime << 8; @@ -1293,10 +1254,7 @@ bridge_ioctl_gfd(struct bridge_softc *sc, void *arg) struct ifbrparam *param = arg; struct bstp_state *bs = &sc->sc_stp; - BRIDGE_LOCK_ASSERT(sc); - param->ifbrp_fwddelay = bs->bs_bridge_forward_delay >> 8; - return (0); } @@ -1306,8 +1264,6 @@ bridge_ioctl_sfd(struct bridge_softc *sc, void *arg) struct ifbrparam *param = arg; struct bstp_state *bs = &sc->sc_stp; - BRIDGE_LOCK_ASSERT(sc); - if (param->ifbrp_fwddelay == 0) return (EINVAL); bs->bs_bridge_forward_delay = param->ifbrp_fwddelay << 8; @@ -1322,10 +1278,7 @@ bridge_ioctl_gma(struct bridge_softc *sc, void *arg) struct ifbrparam *param = arg; struct bstp_state *bs = &sc->sc_stp; - BRIDGE_LOCK_ASSERT(sc); - param->ifbrp_maxage = bs->bs_bridge_max_age >> 8; - return (0); } @@ -1335,8 +1288,6 @@ bridge_ioctl_sma(struct bridge_softc *sc, void *arg) struct ifbrparam *param = arg; struct bstp_state *bs = &sc->sc_stp; - BRIDGE_LOCK_ASSERT(sc); - if (param->ifbrp_maxage == 0) return (EINVAL); bs->bs_bridge_max_age = param->ifbrp_maxage << 8; @@ -1351,8 +1302,6 @@ bridge_ioctl_sifprio(struct bridge_softc *sc, void *arg) struct ifbreq *req = arg; struct bridge_iflist *bif; - BRIDGE_LOCK_ASSERT(sc); - bif = bridge_lookup_member(sc, req->ifbr_ifsname); if (bif == NULL) return (ENOENT); @@ -1369,8 +1318,6 @@ bridge_ioctl_sifcost(struct bridge_softc *sc, void *arg) struct ifbreq *req = arg; struct bridge_iflist *bif; - BRIDGE_LOCK_ASSERT(sc); - bif = bridge_lookup_member(sc, req->ifbr_ifsname); if (bif == NULL) return (ENOENT); @@ -1388,8 +1335,6 @@ bridge_ioctl_addspan(struct bridge_softc *sc, void *arg) struct bridge_iflist *bif = NULL; struct ifnet *ifs; - BRIDGE_LOCK_ASSERT(sc); - ifs = ifunit(req->ifbr_ifsname); if (ifs == NULL) return (ENOENT); @@ -1429,8 +1374,6 @@ bridge_ioctl_delspan(struct bridge_softc *sc, void *arg) struct bridge_iflist *bif; struct ifnet *ifs; - BRIDGE_LOCK_ASSERT(sc); - ifs = ifunit(req->ifbr_ifsname); if (ifs == NULL) return (ENOENT); @@ -1453,8 +1396,6 @@ bridge_ioctl_gbparam(struct bridge_softc *sc, void *arg) struct ifbropreq *req = arg; struct bstp_port *root_port; - BRIDGE_LOCK_ASSERT(sc); - req->ifbop_maxage = sc->sc_stp.bs_max_age; req->ifbop_hellotime = sc->sc_stp.bs_hello_time; req->ifbop_fwddelay = sc->sc_stp.bs_forward_delay; @@ -1478,10 +1419,7 @@ bridge_ioctl_grte(struct bridge_softc *sc, void *arg) { struct ifbrparam *param = arg; - BRIDGE_LOCK_ASSERT(sc); - param->ifbrp_cexceeded = sc->sc_brtexceeded; - return (0); } @@ -1493,8 +1431,6 @@ bridge_ioctl_gifsstp(struct bridge_softc *sc, void *arg) struct ifbpstpreq bpreq; int count, len, error = 0; - BRIDGE_LOCK_ASSERT(sc); - count = 0; LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if ((bif->bif_flags & IFBIF_STP) != 0)