diff options
author | zec <zec@FreeBSD.org> | 2009-05-06 13:30:46 +0000 |
---|---|---|
committer | zec <zec@FreeBSD.org> | 2009-05-06 13:30:46 +0000 |
commit | 0df066f30dddba3c5e7fba8068042b6a4e107faf (patch) | |
tree | c6f78300310cd1a978dc69b42221ee3cb38b83b8 /sys/netinet6 | |
parent | d157e810aefb1bb63831ae8c6a41d0ccc7cbf406 (diff) | |
download | FreeBSD-src-0df066f30dddba3c5e7fba8068042b6a4e107faf.zip FreeBSD-src-0df066f30dddba3c5e7fba8068042b6a4e107faf.tar.gz |
Remove unnecessary CURVNET_SET() calls where curvnet context is
(i.e. seems to be) already set.
This should reduce console noise due to curvnet recursion reports.
This change has no impact on nooptions VIMAGE builds.
Approved by: julian (mentor)
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/mld6.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index 149d351..4204697 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -292,12 +292,10 @@ static __inline uint32_t mld_restore_context(struct mbuf *m) { -#ifdef notyet #if defined(VIMAGE) && defined(INVARIANTS) - KASSERT(curvnet == (m->m_pkthdr.header), + KASSERT(curvnet == m->m_pkthdr.header, ("%s: called when curvnet was not restored", __func__)); #endif -#endif return (m->m_pkthdr.flowid); } @@ -455,8 +453,6 @@ mld_is_addr_reported(const struct in6_addr *addr) * Attach MLD when PF_INET6 is attached to an interface. * * SMPng: Normally called with IF_AFDATA_LOCK held. - * VIMAGE: Currently we set the vnet pointer, although it is - * likely that it was already set by our caller. */ struct mld_ifinfo * mld_domifattach(struct ifnet *ifp) @@ -466,7 +462,6 @@ mld_domifattach(struct ifnet *ifp) CTR3(KTR_MLD, "%s: called for ifp %p(%s)", __func__, ifp, ifp->if_xname); - CURVNET_SET(ifp->if_vnet); MLD_LOCK(); mli = mli_alloc_locked(ifp); @@ -474,7 +469,6 @@ mld_domifattach(struct ifnet *ifp) mli->mli_flags |= MLIF_SILENT; MLD_UNLOCK(); - CURVNET_RESTORE(); return (mli); } @@ -528,9 +522,6 @@ out: * SMPng: Caller must hold IN6_MULTI_LOCK(). * Must take IF_ADDR_LOCK() to cover if_multiaddrs iterator. * XXX This routine is also bitten by unlocked ifma_protospec access. - * - * VIMAGE: curvnet should have been set by caller, but let's not assume - * that for now. */ void mld_ifdetach(struct ifnet *ifp) @@ -542,8 +533,6 @@ mld_ifdetach(struct ifnet *ifp) CTR3(KTR_MLD, "%s: called for ifp %p(%s)", __func__, ifp, ifp->if_xname); - CURVNET_SET(ifp->if_vnet); - IN6_MULTI_LOCK_ASSERT(); MLD_LOCK(); @@ -570,7 +559,6 @@ mld_ifdetach(struct ifnet *ifp) } MLD_UNLOCK(); - CURVNET_RESTORE(); } /* @@ -578,8 +566,6 @@ mld_ifdetach(struct ifnet *ifp) * Runs after link-layer cleanup; free MLD state. * * SMPng: Normally called with IF_AFDATA_LOCK held. - * VIMAGE: curvnet should have been set by caller, but let's not assume - * that for now. */ void mld_domifdetach(struct ifnet *ifp) @@ -588,13 +574,9 @@ mld_domifdetach(struct ifnet *ifp) CTR3(KTR_MLD, "%s: called for ifp %p(%s)", __func__, ifp, ifp->if_xname); - CURVNET_SET(ifp->if_vnet); - MLD_LOCK(); mli_delete_locked(ifp); MLD_UNLOCK(); - - CURVNET_RESTORE(); } static void |