Network processing is not longer done in soft-interrupt context.  That
means that processes doing syscalls no longer need to raise the IPL
level to guarantee consistency, the KERNEL_LOCK() is enough.

Diff below kills two unnecessary splsoftnet()/splx(), ok? 

Index: nfs/nfs_syscalls.c
===================================================================
RCS file: /cvs/src/sys/nfs/nfs_syscalls.c,v
retrieving revision 1.106
diff -u -p -r1.106 nfs_syscalls.c
--- nfs/nfs_syscalls.c  15 Sep 2016 02:00:18 -0000      1.106
+++ nfs/nfs_syscalls.c  13 Feb 2017 11:15:49 -0000
@@ -221,7 +221,7 @@ nfssvc_addsock(struct file *fp, struct m
        struct nfssvc_sock *slp;
        struct socket *so;
        struct nfssvc_sock *tslp;
-       int error, s;
+       int error;
 
        so = (struct socket *)fp->f_data;
        tslp = NULL;
@@ -278,12 +278,10 @@ nfssvc_addsock(struct file *fp, struct m
        slp->ns_nam = mynam;
        fp->f_count++;
        slp->ns_fp = fp;
-       s = splsoftnet();
        so->so_upcallarg = (caddr_t)slp;
        so->so_upcall = nfsrv_rcv;
        slp->ns_flag = (SLP_VALID | SLP_NEEDQ);
        nfsrv_wakenfsd(slp);
-       splx(s);
        return (0);
 }
 
Index: nfs/nfs_vfsops.c
===================================================================
RCS file: /cvs/src/sys/nfs/nfs_vfsops.c,v
retrieving revision 1.112
diff -u -p -r1.112 nfs_vfsops.c
--- nfs/nfs_vfsops.c    15 Nov 2016 13:46:54 -0000      1.112
+++ nfs/nfs_vfsops.c    13 Feb 2017 11:17:52 -0000
@@ -74,6 +74,8 @@ extern u_int32_t nfs_procids[NFS_NPROCS]
 int            nfs_sysctl(int *, u_int, void *, size_t *, void *, size_t, 
struct proc *);
 int            nfs_checkexp(struct mount *, struct mbuf *, int *, struct ucred 
**);
 struct mount   *nfs_mount_diskless(struct nfs_dlmount *, char *, int);
+void           nfs_decode_args(struct nfsmount *, struct nfs_args *,
+                   struct nfs_args *);
 
 /*
  * nfs vfs operations.
@@ -389,12 +391,9 @@ void
 nfs_decode_args(struct nfsmount *nmp, struct nfs_args *argp,
     struct nfs_args *nargp)
 {
-       int s;
        int adjsock = 0;
        int maxio;
 
-       s = splsoftnet();
-
 #if 0
        /* Re-bind if rsrvd port requested and wasn't on one */
        adjsock = !(nmp->nm_flag & NFSMNT_RESVPORT)
@@ -407,7 +406,6 @@ nfs_decode_args(struct nfsmount *nmp, st
        /* Update flags atomically.  Don't change the lock bits. */
        nmp->nm_flag =
            (argp->flags & ~NFSMNT_INTERNAL) | (nmp->nm_flag & NFSMNT_INTERNAL);
-       splx(s);
 
        if ((argp->flags & NFSMNT_TIMEO) && argp->timeo > 0) {
                nmp->nm_timeo = (argp->timeo * NFS_HZ + 5) / 10;
Index: nfs/nfsmount.h
===================================================================
RCS file: /cvs/src/sys/nfs/nfsmount.h,v
retrieving revision 1.26
diff -u -p -r1.26 nfsmount.h
--- nfs/nfsmount.h      27 Sep 2016 01:37:38 -0000      1.26
+++ nfs/nfsmount.h      13 Feb 2017 11:17:02 -0000
@@ -89,8 +89,6 @@ int   nfs_mount(struct mount *, const char
 int    mountnfs(struct nfs_args *, struct mount *, struct mbuf *,
            const char *, char *);
 int    nfs_mountroot(void);
-void   nfs_decode_args(struct nfsmount *, struct nfs_args *,
-           struct nfs_args *);
 int    nfs_start(struct mount *, int, struct proc *);
 int    nfs_unmount(struct mount *, int, struct proc *);
 int    nfs_root(struct mount *, struct vnode **);

Reply via email to