diff options
-rw-r--r-- | sys/nfsclient/nfs_socket.c | 2 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 3 | ||||
-rw-r--r-- | sys/nfsclient/nfsmount.h | 1 |
3 files changed, 1 insertions, 5 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index 64f677cf3fa9..95e509bfd2a1 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 4c7e5997132f..022e3bfbd185 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 09ac7f8cdc16..8c531cbdd504 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 */ |