summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-12-05 10:41:58 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-12-05 10:41:58 +0000
commita55c9c65959f723a879eddc06cab900eacc31e84 (patch)
tree8af7dc12e5f9ceafa05ab6a1fa2f62b0ca926c50
parent844f2ad11288349ad20f6d12bdc54cc0cee49e14 (diff)
Convert infinite sleeps to tsleep_nsec(9).
ok jca@
-rw-r--r--sys/miscfs/deadfs/dead_vnops.c4
-rw-r--r--sys/miscfs/fuse/fusebuf.c4
-rw-r--r--sys/nfs/nfs_aiod.c4
-rw-r--r--sys/nfs/nfs_kq.c4
-rw-r--r--sys/nfs/nfs_socket.c4
-rw-r--r--sys/nfs/nfs_srvcache.c6
-rw-r--r--sys/nfs/nfs_syscalls.c10
7 files changed, 18 insertions, 18 deletions
diff --git a/sys/miscfs/deadfs/dead_vnops.c b/sys/miscfs/deadfs/dead_vnops.c
index d4f523bfd72..6abb2eb638d 100644
--- a/sys/miscfs/deadfs/dead_vnops.c
+++ b/sys/miscfs/deadfs/dead_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dead_vnops.c,v 1.30 2019/10/19 06:56:18 visa Exp $ */
+/* $OpenBSD: dead_vnops.c,v 1.31 2019/12/05 10:41:08 mpi Exp $ */
/* $NetBSD: dead_vnops.c,v 1.16 1996/02/13 13:12:48 mycroft Exp $ */
/*
@@ -266,7 +266,7 @@ chkvnlock(struct vnode *vp)
while (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
- tsleep(vp, PINOD, "chkvnlock", 0);
+ tsleep_nsec(vp, PINOD, "chkvnlock", INFSLP);
locked = 1;
}
return (locked);
diff --git a/sys/miscfs/fuse/fusebuf.c b/sys/miscfs/fuse/fusebuf.c
index 9673491bcba..c2d01bd7b14 100644
--- a/sys/miscfs/fuse/fusebuf.c
+++ b/sys/miscfs/fuse/fusebuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fusebuf.c,v 1.16 2018/06/21 14:53:36 helg Exp $ */
+/* $OpenBSD: fusebuf.c,v 1.17 2019/12/05 10:41:08 mpi Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -82,7 +82,7 @@ int
fb_queue(dev_t dev, struct fusebuf *fbuf)
{
fuse_device_queue_fbuf(dev, fbuf);
- tsleep(fbuf, PWAIT, "fuse", 0);
+ tsleep_nsec(fbuf, PWAIT, "fuse", INFSLP);
return (fbuf->fb_err);
}
diff --git a/sys/nfs/nfs_aiod.c b/sys/nfs/nfs_aiod.c
index ddb595800fc..98c4335f7f6 100644
--- a/sys/nfs/nfs_aiod.c
+++ b/sys/nfs/nfs_aiod.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_aiod.c,v 1.7 2015/08/28 00:03:54 deraadt Exp $ */
+/* $OpenBSD: nfs_aiod.c,v 1.8 2019/12/05 10:41:57 mpi Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -112,7 +112,7 @@ loop: /* Loop around until SIGKILL */
}
while (!(aiod->nad_flags & NFSAIOD_WAKEUP))
- tsleep(aiod, PWAIT, "aiodidle", 0);
+ tsleep_nsec(aiod, PWAIT, "aiodidle", INFSLP);
/*
* Wakeup for this aiod happens in one of the following
diff --git a/sys/nfs/nfs_kq.c b/sys/nfs/nfs_kq.c
index 990f66651c0..0ccbe14ccb3 100644
--- a/sys/nfs/nfs_kq.c
+++ b/sys/nfs/nfs_kq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_kq.c,v 1.25 2019/08/05 08:35:59 anton Exp $ */
+/* $OpenBSD: nfs_kq.c,v 1.26 2019/12/05 10:41:57 mpi Exp $ */
/* $NetBSD: nfs_kq.c,v 1.7 2003/10/30 01:43:10 simonb Exp $ */
/*-
@@ -193,7 +193,7 @@ filt_nfsdetach(struct knote *kn)
while (ke->flags & KEVQ_BUSY) {
ke->flags |= KEVQ_WANT;
rw_exit_write(&nfskevq_lock);
- (void) tsleep(ke, PSOCK, "nfskqdet", 0);
+ tsleep_nsec(ke, PSOCK, "nfskqdet", INFSLP);
rw_enter_write(&nfskevq_lock);
}
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index 7d5a76a5a32..54d6e2a0d36 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_socket.c,v 1.133 2019/05/13 19:21:31 bluhm Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.134 2019/12/05 10:41:57 mpi Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
@@ -407,7 +407,7 @@ nfs_reconnect(struct nfsreq *rep)
while ((error = nfs_connect(nmp, rep)) != 0) {
if (error == EINTR || error == ERESTART)
return (EINTR);
- (void)tsleep((caddr_t)&lbolt, PSOCK, "nfsrecon", 0);
+ tsleep_nsec(&lbolt, PSOCK, "nfsrecon", INFSLP);
}
/*
diff --git a/sys/nfs/nfs_srvcache.c b/sys/nfs/nfs_srvcache.c
index ee15fc49022..4a4b07fc234 100644
--- a/sys/nfs/nfs_srvcache.c
+++ b/sys/nfs/nfs_srvcache.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_srvcache.c,v 1.28 2015/08/28 00:03:54 deraadt Exp $ */
+/* $OpenBSD: nfs_srvcache.c,v 1.29 2019/12/05 10:41:57 mpi Exp $ */
/* $NetBSD: nfs_srvcache.c,v 1.12 1996/02/18 11:53:49 fvdl Exp $ */
/*
@@ -183,7 +183,7 @@ nfsrv_getcache(struct nfsrv_descript *nd, struct nfssvc_sock *slp,
rp = TAILQ_FIRST(&nfsrvlruhead);
while ((rp->rc_flag & RC_LOCKED) != 0) {
rp->rc_flag |= RC_WANTED;
- tsleep(rp, PZERO-1, "nfsrc", 0);
+ tsleep_nsec(rp, PZERO-1, "nfsrc", INFSLP);
rp = TAILQ_FIRST(&nfsrvlruhead);
}
rp->rc_flag |= RC_LOCKED;
@@ -285,7 +285,7 @@ loop:
netaddr_match(NETFAMILY(rp), &rp->rc_haddr, nd->nd_nam)) {
if ((rp->rc_flag & RC_LOCKED)) {
rp->rc_flag |= RC_WANTED;
- tsleep(rp, PZERO - 1, "nfsrc", 0);
+ tsleep_nsec(rp, PZERO - 1, "nfsrc", INFSLP);
goto loop;
}
rp->rc_flag |= RC_LOCKED;
diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c
index 2e1f43eb7fc..4a5a30c13df 100644
--- a/sys/nfs/nfs_syscalls.c
+++ b/sys/nfs/nfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_syscalls.c,v 1.114 2018/06/06 06:55:22 mpi Exp $ */
+/* $OpenBSD: nfs_syscalls.c,v 1.115 2019/12/05 10:41:57 mpi Exp $ */
/* $NetBSD: nfs_syscalls.c,v 1.19 1996/02/18 11:53:52 fvdl Exp $ */
/*
@@ -165,7 +165,7 @@ sys_nfssvc(struct proc *p, void *v, register_t *retval)
while (nfssvc_sockhead_flag & SLP_INIT) {
nfssvc_sockhead_flag |= SLP_WANTINIT;
- tsleep(&nfssvc_sockhead, PSOCK, "nfsd init", 0);
+ tsleep_nsec(&nfssvc_sockhead, PSOCK, "nfsd init", INFSLP);
}
switch (flags) {
@@ -604,8 +604,8 @@ nfssvc_iod(void *arg)
/* Just loop around doin our stuff until SIGKILL. */
for (;;) {
while (TAILQ_FIRST(&nfs_bufq) == NULL && error == 0) {
- error = tsleep(&nfs_bufq,
- PWAIT | PCATCH, "nfsidl", 0);
+ error = tsleep_nsec(&nfs_bufq,
+ PWAIT | PCATCH, "nfsidl", INFSLP);
}
while ((bp = TAILQ_FIRST(&nfs_bufq)) != NULL) {
/* Take one off the front of the list */
@@ -702,7 +702,7 @@ again:
(nfsd_head_flag & NFSD_CHECKSLP) == 0) {
nfsd->nfsd_flag |= NFSD_WAITING;
nfsd_waiting++;
- error = tsleep(nfsd, PSOCK | PCATCH, "nfsd", 0);
+ error = tsleep_nsec(nfsd, PSOCK | PCATCH, "nfsd", INFSLP);
nfsd_waiting--;
if (error)
return (error);