summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-08 15:11:18 +0000
committerphk <phk@FreeBSD.org>2002-09-08 15:11:18 +0000
commit549c71a09915ad3f75cea2d2ae2e05e7abbc82ef (patch)
tree300d285187084ecc74ba58737d1949ad7a07e003 /sys/nfsclient
parent3a164c2a89ac4b13c521b3e499713dcd2bf936cc (diff)
downloadFreeBSD-src-549c71a09915ad3f75cea2d2ae2e05e7abbc82ef.zip
FreeBSD-src-549c71a09915ad3f75cea2d2ae2e05e7abbc82ef.tar.gz
Now that we have a cached mount credential in struct mount, use it istead
of a private cached copy.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_socket.c2
-rw-r--r--sys/nfsclient/nfs_vfsops.c3
-rw-r--r--sys/nfsclient/nfsmount.h1
3 files changed, 1 insertions, 5 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c
index 64f677c..95e509b 100644
--- a/sys/nfsclient/nfs_socket.c
+++ b/sys/nfsclient/nfs_socket.c
@@ -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;
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 4c7e599..022e3bf 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -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);
}
diff --git a/sys/nfsclient/nfsmount.h b/sys/nfsclient/nfsmount.h
index 09ac7f8..8c531cb 100644
--- a/sys/nfsclient/nfsmount.h
+++ b/sys/nfsclient/nfsmount.h
@@ -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 */
OpenPOWER on IntegriCloud