diff options
-rw-r--r-- | sys/fs/nfs/nfsport.h | 7 | ||||
-rw-r--r-- | sys/fs/nfsclient/nfs_clbio.c | 8 | ||||
-rw-r--r-- | sys/fs/nfsclient/nfs_clvnops.c | 6 |
3 files changed, 14 insertions, 7 deletions
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h index 1f4872b..f05c84e 100644 --- a/sys/fs/nfs/nfsport.h +++ b/sys/fs/nfs/nfsport.h @@ -911,6 +911,13 @@ struct nfsreq { #define NFSVNO_DELEGOK(v) (1) #endif +/* + * Define this as the flags argument for msleep() when catching signals + * while holding a resource that other threads would block for, such as + * a vnode lock. + */ +#define NFS_PCATCH (PCATCH | PBDRY) + #endif /* _KERNEL */ #endif /* _NFSPORT_NFS_H */ diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 1e7785b..030e322 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -1357,7 +1357,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, struct thread *td) sigset_t oldset; ncl_set_sigmask(td, &oldset); - bp = getblk(vp, bn, size, PCATCH, 0, 0); + bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0); ncl_restore_sigmask(td, &oldset); while (bp == NULL) { if (newnfs_sigintr(nmp, td)) @@ -1396,7 +1396,7 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg) if ((nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF)) intrflg = 1; if (intrflg) { - slpflag = PCATCH; + slpflag = NFS_PCATCH; slptimeo = 2 * hz; } else { slpflag = 0; @@ -1484,7 +1484,7 @@ ncl_asyncio(struct nfsmount *nmp, struct buf *bp, struct ucred *cred, struct thr } again: if (nmp->nm_flag & NFSMNT_INT) - slpflag = PCATCH; + slpflag = NFS_PCATCH; gotiod = FALSE; /* @@ -1553,7 +1553,7 @@ again: mtx_unlock(&ncl_iod_mutex); return (error2); } - if (slpflag == PCATCH) { + if (slpflag == NFS_PCATCH) { slpflag = 0; slptimeo = 2 * hz; } diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index f75787b..0b224ad 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -2448,7 +2448,7 @@ ncl_flush(struct vnode *vp, int waitfor, struct ucred *cred, struct thread *td, int bvecsize = 0, bveccount; if (nmp->nm_flag & NFSMNT_INT) - slpflag = PCATCH; + slpflag = NFS_PCATCH; if (!commit) passone = 0; bo = &vp->v_bufobj; @@ -2646,7 +2646,7 @@ loop: error = EINTR; goto done; } - if (slpflag == PCATCH) { + if (slpflag & PCATCH) { slpflag = 0; slptimeo = 2 * hz; } @@ -2684,7 +2684,7 @@ loop: error = newnfs_sigintr(nmp, td); if (error) goto done; - if (slpflag == PCATCH) { + if (slpflag & PCATCH) { slpflag = 0; slptimeo = 2 * hz; } |