diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-05-08 09:11:21 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-05-08 09:11:21 +0000 |
commit | e7100a4e41ab269e2d64ecea0e5dcd5488492880 (patch) | |
tree | 919ce8a920d7c26585f98acb4bd00f484c5ab687 /sys/nfs/nfs_socket.c | |
parent | 7a1bf45b9890fecdf9d8969b5a5da163746a9d6a (diff) |
Sync nfs_connect() w/ sys_connect().
ok bluhm@
Diffstat (limited to 'sys/nfs/nfs_socket.c')
-rw-r--r-- | sys/nfs/nfs_socket.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index c562aae7327..d6f31340a17 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_socket.c,v 1.114 2017/03/03 09:41:20 mpi Exp $ */ +/* $OpenBSD: nfs_socket.c,v 1.115 2017/05/08 09:11:20 mpi Exp $ */ /* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */ /* @@ -306,25 +306,24 @@ nfs_connect(struct nfsmount *nmp, struct nfsreq *rep) * connect system call but with the wait timing out so * that interruptible mounts don't hang here for a long time. */ - s = splsoftnet(); + s = solock(so); while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) { - (void) tsleep((caddr_t)&so->so_timeo, PSOCK, - "nfscon", 2 * hz); + sosleep(so, &so->so_timeo, PSOCK, "nfscon", 2 * hz); if ((so->so_state & SS_ISCONNECTING) && so->so_error == 0 && rep && (error = nfs_sigintr(nmp, rep, rep->r_procp)) != 0){ so->so_state &= ~SS_ISCONNECTING; - splx(s); + sounlock(s); goto bad; } } if (so->so_error) { error = so->so_error; so->so_error = 0; - splx(s); + sounlock(s); goto bad; } - splx(s); + sounlock(s); } /* * Always set receive timeout to detect server crash and reconnect. |