From d0e443aa3af2bb8ed534b3ff361e6d9c82f8e948 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 31 May 1998 18:46:06 +0000 Subject: [PATCH] Use the new SB_UPCALL flag, Obtained from: NetBSD (but I changed the flag clear order in case). --- sys/nfs/nfs_syscalls.c | 5 ++++- sys/nfsclient/nfs_nfsiod.c | 5 ++++- sys/nfsserver/nfs_syscalls.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c index 94f33e246d14..2f0716103f97 100644 --- a/sys/nfs/nfs_syscalls.c +++ b/sys/nfs/nfs_syscalls.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.38 1998/05/19 07:11:25 peter Exp $ + * $Id: nfs_syscalls.c,v 1.39 1998/05/31 17:27:53 peter Exp $ */ #include @@ -433,6 +433,7 @@ nfssvc_addsock(fp, mynam, p) s = splnet(); so->so_upcallarg = (caddr_t)slp; so->so_upcall = nfsrv_rcv; + so->so_rcv.sb_flags |= SB_UPCALL; slp->ns_flag = (SLP_VALID | SLP_NEEDQ); nfsrv_wakenfsd(slp); splx(s); @@ -770,7 +771,9 @@ nfsrv_zapsock(slp) if (fp) { slp->ns_fp = (struct file *)0; so = slp->ns_so; + so->so_rcv.sb_flags &= ~SB_UPCALL; so->so_upcall = NULL; + so->so_upcallarg = NULL; soshutdown(so, 2); closef(fp, (struct proc *)0); if (slp->ns_nam) diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c index 94f33e246d14..2f0716103f97 100644 --- a/sys/nfsclient/nfs_nfsiod.c +++ b/sys/nfsclient/nfs_nfsiod.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.38 1998/05/19 07:11:25 peter Exp $ + * $Id: nfs_syscalls.c,v 1.39 1998/05/31 17:27:53 peter Exp $ */ #include @@ -433,6 +433,7 @@ nfssvc_addsock(fp, mynam, p) s = splnet(); so->so_upcallarg = (caddr_t)slp; so->so_upcall = nfsrv_rcv; + so->so_rcv.sb_flags |= SB_UPCALL; slp->ns_flag = (SLP_VALID | SLP_NEEDQ); nfsrv_wakenfsd(slp); splx(s); @@ -770,7 +771,9 @@ nfsrv_zapsock(slp) if (fp) { slp->ns_fp = (struct file *)0; so = slp->ns_so; + so->so_rcv.sb_flags &= ~SB_UPCALL; so->so_upcall = NULL; + so->so_upcallarg = NULL; soshutdown(so, 2); closef(fp, (struct proc *)0); if (slp->ns_nam) diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c index 94f33e246d14..2f0716103f97 100644 --- a/sys/nfsserver/nfs_syscalls.c +++ b/sys/nfsserver/nfs_syscalls.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.38 1998/05/19 07:11:25 peter Exp $ + * $Id: nfs_syscalls.c,v 1.39 1998/05/31 17:27:53 peter Exp $ */ #include @@ -433,6 +433,7 @@ nfssvc_addsock(fp, mynam, p) s = splnet(); so->so_upcallarg = (caddr_t)slp; so->so_upcall = nfsrv_rcv; + so->so_rcv.sb_flags |= SB_UPCALL; slp->ns_flag = (SLP_VALID | SLP_NEEDQ); nfsrv_wakenfsd(slp); splx(s); @@ -770,7 +771,9 @@ nfsrv_zapsock(slp) if (fp) { slp->ns_fp = (struct file *)0; so = slp->ns_so; + so->so_rcv.sb_flags &= ~SB_UPCALL; so->so_upcall = NULL; + so->so_upcallarg = NULL; soshutdown(so, 2); closef(fp, (struct proc *)0); if (slp->ns_nam)