summaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-08-11 21:24:21 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-08-11 21:24:21 +0000
commitbda0e09dc4819e6f0da56bc659a507a53ce2c49e (patch)
treeb8a35df42b1a236d2f93a31c84fab1deb17e8a67 /sys/nfs
parent119ca99b6e7df0e54659d9e9b1b7f7960196ac58 (diff)
Remove NET_LOCK()'s argument.
Tested by Hrvoje Popovski, ok bluhm@
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_boot.c16
-rw-r--r--sys/nfs/nfs_socket.c8
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/nfs/nfs_boot.c b/sys/nfs/nfs_boot.c
index 814b7902c7b..f4e8dff56a2 100644
--- a/sys/nfs/nfs_boot.c
+++ b/sys/nfs/nfs_boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_boot.c,v 1.42 2017/07/19 12:32:13 claudio Exp $ */
+/* $OpenBSD: nfs_boot.c,v 1.43 2017/08/11 21:24:20 mpi Exp $ */
/* $NetBSD: nfs_boot.c,v 1.26 1996/05/07 02:51:25 thorpej Exp $ */
/*
@@ -122,7 +122,7 @@ nfs_boot_init(struct nfs_diskless *nd, struct proc *procp)
struct socket *so;
struct ifaddr *ifa;
char addr[INET_ADDRSTRLEN];
- int s, error;
+ int error;
/*
* Find an interface, rarp for its ip address, stuff it, the
@@ -159,15 +159,15 @@ nfs_boot_init(struct nfs_diskless *nd, struct proc *procp)
*/
if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0)) != 0)
panic("nfs_boot: socreate, error=%d", error);
- NET_LOCK(s);
+ NET_LOCK();
error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)&ireq, procp);
- NET_UNLOCK(s);
+ NET_UNLOCK();
if (error)
panic("nfs_boot: GIFFLAGS, error=%d", error);
ireq.ifr_flags |= IFF_UP;
- NET_LOCK(s);
+ NET_LOCK();
error = ifioctl(so, SIOCSIFFLAGS, (caddr_t)&ireq, procp);
- NET_UNLOCK(s);
+ NET_UNLOCK();
if (error)
panic("nfs_boot: SIFFLAGS, error=%d", error);
@@ -190,9 +190,9 @@ nfs_boot_init(struct nfs_diskless *nd, struct proc *procp)
sin->sin_len = sizeof(*sin);
sin->sin_family = AF_INET;
sin->sin_addr.s_addr = my_ip.s_addr;
- NET_LOCK(s);
+ NET_LOCK();
error = ifioctl(so, SIOCAIFADDR, (caddr_t)&ifra, procp);
- NET_UNLOCK(s);
+ NET_UNLOCK();
if (error)
panic("nfs_boot: set if addr, error=%d", error);
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index 5ed5a9ed26a..9924a5e5edc 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_socket.c,v 1.122 2017/08/10 19:20:43 mpi Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.123 2017/08/11 21:24:20 mpi Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
@@ -1137,9 +1137,9 @@ nfs_timer(void *arg)
struct nfsreq *rep;
struct mbuf *m;
struct socket *so;
- int timeo, s, error;
+ int timeo, error;
- NET_LOCK(s);
+ NET_LOCK();
TAILQ_FOREACH(rep, &nmp->nm_reqsq, r_chain) {
if (rep->r_mrep || (rep->r_flags & R_SOFTTERM))
continue;
@@ -1222,7 +1222,7 @@ nfs_timer(void *arg)
}
}
}
- NET_UNLOCK(s);
+ NET_UNLOCK();
timeout_add(&nmp->nm_rtimeout, nfs_ticks);
}