From effb15c0c5c0694bce3a0f19b8cd1ba399cc540e Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Mon, 12 Jul 2004 04:33:58 +0000 Subject: [PATCH] Remove spl's from netatalk in preparation to merge locking. --- sys/netatalk/at_control.c | 8 +------- sys/netatalk/ddp_usrreq.c | 23 ----------------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c index 3b2167606175..064ae0431816 100644 --- a/sys/netatalk/at_control.c +++ b/sys/netatalk/at_control.c @@ -355,7 +355,7 @@ at_ifinit(ifp, aa, sat) { struct netrange nr, onr; struct sockaddr_at oldaddr; - int s = splimp(), error = 0, i, j; + int error = 0, i, j; int netinc, nodeinc, nnets; u_short net; @@ -442,7 +442,6 @@ at_ifinit(ifp, aa, sat) aa->aa_addr = oldaddr; aa->aa_firstnet = onr.nr_firstnet; aa->aa_lastnet = onr.nr_lastnet; - splx(s); return (EINVAL); } /* @@ -511,7 +510,6 @@ at_ifinit(ifp, aa, sat) aa->aa_addr = oldaddr; aa->aa_firstnet = onr.nr_firstnet; aa->aa_lastnet = onr.nr_lastnet; - splx(s); return (EINTR); } @@ -545,7 +543,6 @@ at_ifinit(ifp, aa, sat) aa->aa_addr = oldaddr; aa->aa_firstnet = onr.nr_firstnet; aa->aa_lastnet = onr.nr_lastnet; - splx(s); return (EADDRINUSE); } } @@ -563,7 +560,6 @@ at_ifinit(ifp, aa, sat) aa->aa_addr = oldaddr; aa->aa_firstnet = onr.nr_firstnet; aa->aa_lastnet = onr.nr_lastnet; - splx(s); return (error); } @@ -631,7 +627,6 @@ at_ifinit(ifp, aa, sat) aa->aa_addr = oldaddr; aa->aa_firstnet = onr.nr_firstnet; aa->aa_lastnet = onr.nr_lastnet; - splx(s); return (error); } @@ -640,7 +635,6 @@ at_ifinit(ifp, aa, sat) */ aa->aa_ifa.ifa_flags |= IFA_ROUTE; aa->aa_flags |= AFA_ROUTE; - splx(s); return (0); } diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c index 785952002a3d..e33da4aba730 100644 --- a/sys/netatalk/ddp_usrreq.c +++ b/sys/netatalk/ddp_usrreq.c @@ -32,7 +32,6 @@ ddp_attach(struct socket *so, int proto, struct thread *td) { struct ddpcb *ddp; int error = 0; - int s; ddp = sotoddpcb(so); @@ -40,9 +39,7 @@ ddp_attach(struct socket *so, int proto, struct thread *td) return (EINVAL); } - s = splnet(); error = at_pcballoc(so); - splx(s); if (error) { return (error); } @@ -53,15 +50,12 @@ static int ddp_detach(struct socket *so) { struct ddpcb *ddp; - int s; ddp = sotoddpcb(so); if (ddp == NULL) { return (EINVAL); } - s = splnet(); at_pcbdetach(so, ddp); - splx(s); return (0); } @@ -70,15 +64,12 @@ ddp_bind(struct socket *so, struct sockaddr *nam, struct thread *td) { struct ddpcb *ddp; int error = 0; - int s; ddp = sotoddpcb(so); if (ddp == NULL) { return (EINVAL); } - s = splnet(); error = at_pcbsetaddr(ddp, nam, td); - splx(s); return (error); } @@ -87,7 +78,6 @@ ddp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) { struct ddpcb *ddp; int error = 0; - int s; ddp = sotoddpcb(so); if (ddp == NULL) { @@ -98,9 +88,7 @@ ddp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) return (EISCONN); } - s = splnet(); error = at_pcbconnect(ddp, nam, td); - splx(s); if (error == 0) soisconnected(so); return (error); @@ -111,7 +99,6 @@ ddp_disconnect(struct socket *so) { struct ddpcb *ddp; - int s; ddp = sotoddpcb(so); if (ddp == NULL) { @@ -121,10 +108,8 @@ ddp_disconnect(struct socket *so) return (ENOTCONN); } - s = splnet(); at_pcbdisconnect(ddp); ddp->ddp_fsat.sat_addr.s_node = ATADDR_ANYNODE; - splx(s); soisdisconnected(so); return (0); } @@ -148,7 +133,6 @@ ddp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, { struct ddpcb *ddp; int error = 0; - int s; ddp = sotoddpcb(so); if (ddp == NULL) { @@ -164,9 +148,7 @@ ddp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, return (EISCONN); } - s = splnet(); error = at_pcbconnect(ddp, addr, td); - splx(s); if (error) { return (error); } @@ -176,12 +158,10 @@ ddp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, } } - s = splnet(); error = ddp_output(m, so); if (addr != NULL) { at_pcbdisconnect(ddp); } - splx(s); return (error); } @@ -189,15 +169,12 @@ static int ddp_abort(struct socket *so) { struct ddpcb *ddp; - int s; ddp = sotoddpcb(so); if (ddp == NULL) { return (EINVAL); } - s = splnet(); at_pcbdetach(so, ddp); - splx(s); return (0); }