Now that we have a cached mount credential in struct mount, use it istead

of a private cached copy.
This commit is contained in:
Poul-Henning Kamp 2002-09-08 15:11:18 +00:00
parent c64685aa58
commit 7e6fb406ff
3 changed files with 1 additions and 5 deletions

View file

@ -164,7 +164,7 @@ nfs_connect(struct nfsmount *nmp, struct nfsreq *rep)
nmp->nm_so = NULL;
saddr = nmp->nm_nam;
error = socreate(saddr->sa_family, &nmp->nm_so, nmp->nm_sotype,
nmp->nm_soproto, nmp->nm_cred, td);
nmp->nm_soproto, nmp->nm_mountp->mnt_cred, td);
if (error)
goto bad;
so = nmp->nm_so;

View file

@ -807,7 +807,6 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
}
vfs_getnewfsid(mp);
nmp->nm_mountp = mp;
nmp->nm_cred = crhold(cred);
/*
* V2 can only handle 32 bit filesizes. A 4GB-1 limit may be too
@ -885,7 +884,6 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
return (0);
bad:
nfs_disconnect(nmp);
crfree(nmp->nm_cred);
uma_zfree(nfsmount_zone, nmp);
FREE(nam, M_SONAME);
return (error);
@ -926,7 +924,6 @@ nfs_unmount(struct mount *mp, int mntflags, struct thread *td)
nfs_disconnect(nmp);
FREE(nmp->nm_nam, M_SONAME);
crfree(nmp->nm_cred);
uma_zfree(nfsmount_zone, nmp);
return (0);
}

View file

@ -53,7 +53,6 @@ struct nfsmount {
u_char nm_fh[NFSX_V3FHMAX]; /* File handle of root dir */
int nm_fhsize; /* Size of root file handle */
struct socket *nm_so; /* Rpc socket */
struct ucred *nm_cred; /* Cached mount-time credential */
int nm_sotype; /* Type of socket */
int nm_soproto; /* and protocol */
int nm_soflags; /* pr_flags for socket protocol */