A small cleanup patch
Andre Oppermann
oppermann at networx.ch
Thu Oct 18 14:09:40 UTC 2012
On 05.10.2012 01:21, Vijay Singh wrote:
> Folks, I came up with this while going through the lltable code.
Thank you. I just purged a larger number of stray spl* from the
net*/* directories. This stuff won't be backported to 9-STABLE
though.
--
Andre
> kong@[/u/vijay/bsd/CODE/cur/sys]# svn diff net/if.c
> Index: net/if.c
> ===================================================================
> --- net/if.c (revision 241169)
> +++ net/if.c (working copy)
> @@ -691,12 +691,9 @@
> if_attachdomain(void *dummy)
> {
> struct ifnet *ifp;
> - int s;
>
> - s = splnet();
> TAILQ_FOREACH(ifp, &V_ifnet, if_link)
> if_attachdomain1(ifp);
> - splx(s);
> }
> SYSINIT(domainifattach, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_SECOND,
> if_attachdomain, NULL);
> @@ -705,22 +702,17 @@
> if_attachdomain1(struct ifnet *ifp)
> {
> struct domain *dp;
> - int s;
>
> - s = splnet();
> -
> /*
> * Since dp->dom_ifattach calls malloc() with M_WAITOK, we
> * cannot lock ifp->if_afdata initialization, entirely.
> */
> if (IF_AFDATA_TRYLOCK(ifp) == 0) {
> - splx(s);
> return;
> }
> if (ifp->if_afdata_initialized >= domain_init_status) {
> IF_AFDATA_UNLOCK(ifp);
> - splx(s);
> - printf("if_attachdomain called more than once on %s\n",
> + log(LOG_WARNING, "if_attachdomain called more than once on %s\n",
> ifp->if_xname);
> return;
> }
> @@ -734,8 +726,6 @@
> ifp->if_afdata[dp->dom_family] =
> (*dp->dom_ifattach)(ifp);
> }
> -
> - splx(s);
> }
>
> /*
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>
>
More information about the freebsd-net
mailing list