Author: trasz
Date: Mon Mar  4 13:18:04 2019
New Revision: 344760
URL: https://svnweb.freebsd.org/changeset/base/344760

Log:
  Don't pass td to nfsd_fhtovp(), it's unused.
  
  Reviewed by:  rmacklem (earlier version)
  MFC after:    2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:        https://reviews.freebsd.org/D19421

Modified:
  head/sys/fs/nfs/nfs_var.h
  head/sys/fs/nfsserver/nfs_nfsdport.c
  head/sys/fs/nfsserver/nfs_nfsdserv.c
  head/sys/fs/nfsserver/nfs_nfsdsocket.c

Modified: head/sys/fs/nfs/nfs_var.h
==============================================================================
--- head/sys/fs/nfs/nfs_var.h   Mon Mar  4 13:12:23 2019        (r344759)
+++ head/sys/fs/nfs/nfs_var.h   Mon Mar  4 13:18:04 2019        (r344760)
@@ -358,8 +358,7 @@ int nfscl_request(struct nfsrv_descript *, vnode_t,
 
 /* nfs_nfsdsubs.c */
 void nfsd_fhtovp(struct nfsrv_descript *, struct nfsrvfh *, int,
-    vnode_t *, struct nfsexstuff *,
-    mount_t *, int, NFSPROC_T *);
+    vnode_t *, struct nfsexstuff *, mount_t *, int);
 int nfsd_excred(struct nfsrv_descript *, struct nfsexstuff *, struct ucred *);
 int nfsrv_mtofh(struct nfsrv_descript *, struct nfsrvfh *);
 int nfsrv_putattrbit(struct nfsrv_descript *, nfsattrbit_t *);

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c        Mon Mar  4 13:12:23 2019        
(r344759)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c        Mon Mar  4 13:18:04 2019        
(r344760)
@@ -3041,7 +3041,7 @@ nfsvno_fhtovp(struct mount *mp, fhandle_t *fhp, struct
 void
 nfsd_fhtovp(struct nfsrv_descript *nd, struct nfsrvfh *nfp, int lktype,
     struct vnode **vpp, struct nfsexstuff *exp,
-    struct mount **mpp, int startwrite, struct thread *p)
+    struct mount **mpp, int startwrite)
 {
        struct mount *mp;
        struct ucred *credanon;

Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdserv.c        Mon Mar  4 13:12:23 2019        
(r344759)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.c        Mon Mar  4 13:18:04 2019        
(r344760)
@@ -1609,7 +1609,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, int isdgram,
                        NFSVOPUNLOCK(dp, 0);
                        nd->nd_cred->cr_uid = nd->nd_saveduid;
                        nfsd_fhtovp(nd, &tfh, LK_EXCLUSIVE, &tdp, &tnes, NULL,
-                           0, p);      /* Locks tdp. */
+                           0); /* Locks tdp. */
                        if (tdp) {
                                tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd,
                                    p, 1, NULL);
@@ -1740,8 +1740,7 @@ nfsrvd_link(struct nfsrv_descript *nd, int isdgram,
                                /* tovp is always NULL unless NFSv4 */
                                goto out;
                        }
-                       nfsd_fhtovp(nd, &dfh, LK_EXCLUSIVE, &dp, &tnes, NULL, 0,
-                           p);
+                       nfsd_fhtovp(nd, &dfh, LK_EXCLUSIVE, &dp, &tnes, NULL, 
0);
                        if (dp)
                                NFSVOPUNLOCK(dp, 0);
                }
@@ -3612,7 +3611,7 @@ nfsrvd_secinfo(struct nfsrv_descript *nd, int isdgram,
        vput(vp);
        savflag = nd->nd_flag;
        if (!nd->nd_repstat) {
-               nfsd_fhtovp(nd, &fh, LK_SHARED, &vp, &retnes, NULL, 0, p);
+               nfsd_fhtovp(nd, &fh, LK_SHARED, &vp, &retnes, NULL, 0);
                if (vp)
                        vput(vp);
        }

Modified: head/sys/fs/nfsserver/nfs_nfsdsocket.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdsocket.c      Mon Mar  4 13:12:23 2019        
(r344759)
+++ head/sys/fs/nfsserver/nfs_nfsdsocket.c      Mon Mar  4 13:18:04 2019        
(r344760)
@@ -478,10 +478,7 @@ nfsrvd_dorpc(struct nfsrv_descript *nd, int isdgram, u
        mount_t mp = NULL;
        struct nfsrvfh fh;
        struct nfsexstuff nes;
-       struct thread *p;
 
-       p = curthread;
-
        /*
         * Get a locked vnode for the first file handle
         */
@@ -516,10 +513,10 @@ nfsrvd_dorpc(struct nfsrv_descript *nd, int isdgram, u
                                lktype = LK_EXCLUSIVE;
                        if (nd->nd_flag & ND_PUBLOOKUP)
                                nfsd_fhtovp(nd, &nfs_pubfh, lktype, &vp, &nes,
-                                   &mp, nfsrv_writerpc[nd->nd_procnum], p);
+                                   &mp, nfsrv_writerpc[nd->nd_procnum]);
                        else
                                nfsd_fhtovp(nd, &fh, lktype, &vp, &nes,
-                                   &mp, nfsrv_writerpc[nd->nd_procnum], p);
+                                   &mp, nfsrv_writerpc[nd->nd_procnum]);
                        if (nd->nd_repstat == NFSERR_PROGNOTV4)
                                goto out;
                }
@@ -865,7 +862,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram
                                goto nfsmout;
                        if (!nd->nd_repstat)
                                nfsd_fhtovp(nd, &fh, LK_SHARED, &nvp, &nes,
-                                   NULL, 0, p);
+                                   NULL, 0);
                        /* For now, allow this for non-export FHs */
                        if (!nd->nd_repstat) {
                                if (vp)
@@ -879,7 +876,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram
                case NFSV4OP_PUTPUBFH:
                        if (nfs_pubfhset)
                            nfsd_fhtovp(nd, &nfs_pubfh, LK_SHARED, &nvp,
-                               &nes, NULL, 0, p);
+                               &nes, NULL, 0);
                        else
                            nd->nd_repstat = NFSERR_NOFILEHANDLE;
                        if (!nd->nd_repstat) {
@@ -894,7 +891,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram
                case NFSV4OP_PUTROOTFH:
                        if (nfs_rootfhset) {
                                nfsd_fhtovp(nd, &nfs_rootfh, LK_SHARED, &nvp,
-                                   &nes, NULL, 0, p);
+                                   &nes, NULL, 0);
                                if (!nd->nd_repstat) {
                                        if (vp)
                                                vrele(vp);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to