summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_socket.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-12-19 08:36:51 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-12-19 08:36:51 +0000
commit347b9bada49618963c84880ec8c3c23c96aa0017 (patch)
treed431218ec3017a484e7de695c002a79a0e68cc86 /sys/nfs/nfs_socket.c
parentc22be17b5bebb223df391aa82dfc7704004aafa7 (diff)
Introduce the NET_LOCK() a rwlock used to serialize accesses to the parts
of the network stack that are not yet ready to be executed in parallel or where new sleeping points are not possible. This first pass replace all the entry points leading to ip_output(). This is done to not introduce new sleeping points when trying to acquire ART's write lock, needed when a new L2 entry is created via the RT_RESOLVE. Inputs from and ok bluhm@, ok dlg@
Diffstat (limited to 'sys/nfs/nfs_socket.c')
-rw-r--r--sys/nfs/nfs_socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index 168c70f7de7..5b9cfe0b03d 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_socket.c,v 1.111 2015/08/24 14:00:29 bluhm Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.112 2016/12/19 08:36:50 mpi Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
@@ -1132,7 +1132,7 @@ nfs_timer(void *arg)
struct socket *so;
int timeo, s, error;
- s = splsoftnet();
+ NET_LOCK(s);
TAILQ_FOREACH(rep, &nmp->nm_reqsq, r_chain) {
if (rep->r_mrep || (rep->r_flags & R_SOFTTERM))
continue;
@@ -1215,7 +1215,7 @@ nfs_timer(void *arg)
}
}
}
- splx(s);
+ NET_UNLOCK(s);
timeout_add(&nmp->nm_rtimeout, nfs_ticks);
}