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
This commit is contained in:
@@ -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 *);
|
||||
|
||||
@@ -3041,7 +3041,7 @@ nfsvno_fhtovp(struct mount *mp, fhandle_t *fhp, struct sockaddr *nam,
|
||||
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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -478,9 +478,6 @@ nfsrvd_dorpc(struct nfsrv_descript *nd, int isdgram, u_char *tag, int taglen,
|
||||
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_char *tag, int taglen,
|
||||
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, u_char *tag,
|
||||
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, u_char *tag,
|
||||
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, u_char *tag,
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user