changeset 13915:7a70014b0372

nfs41: Remove old nfs41_fhtovp and use nfs41_fhtovp_exi instead.
author Dan Kruchinin <dan.kruchinin@nexenta.com>
date Thu, 18 Aug 2011 00:55:36 +0300
parents 66813fe19e71
children e1a0157582de
files usr/src/uts/common/fs/nfs/nfs41_filehandle.c usr/src/uts/common/fs/nfs/nfs_nnode_vn.c usr/src/uts/common/nfs/nfs41_filehandle.h
diffstat 3 files changed, 9 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/fs/nfs/nfs41_filehandle.c	Thu Aug 18 00:55:35 2011 +0300
+++ b/usr/src/uts/common/fs/nfs/nfs41_filehandle.c	Thu Aug 18 00:55:36 2011 +0300
@@ -83,28 +83,7 @@
  * This function understands FH_TYPE_NFS version 1 filehandles.
  */
 vnode_t *
-nfs41_fhtovp(nfs_fh4 *otw_fh, compound_state_t *cs)
-{
-	/*
-	 * If the compound state does not hold the export info, the
-	 * filehandle must be stale (or we were called too soon).
-	 */
-	if (cs->exi == NULL) {
-		*cs->statusp = NFS4ERR_STALE;
-		return (NULL);
-	}
-
-	ASSERT(cs->exi->exi_vp != NULL);
-	if (cs->exi->exi_vp == NULL) {
-		*cs->statusp = NFS4ERR_STALE;
-		return (NULL);
-	}
-
-	return (nfs41_fhtovp_exi(otw_fh, cs->exi, cs->statusp));
-}
-
-vnode_t *
-nfs41_fhtovp_exi(nfs_fh4 *otw_fh, exportinfo_t *exi, nfsstat4 *statusp)
+nfs41_fhtovp(nfs_fh4 *otw_fh, exportinfo_t *exi, nfsstat4 *statusp)
 {
 	int error;
 	fid_t fidp;
@@ -112,6 +91,12 @@
 	vfs_t *vfsp;
 	vnode_t *vp;
 
+	if (exi == NULL) {
+		*statusp = NFS4ERR_STALE;
+		return (NULL);
+	}
+
+	ASSERT(exi->exi_vp != NULL);
 	vfsp = exi->exi_vp->v_vfsp;
 
 	ASSERT(vfsp != NULL);
--- a/usr/src/uts/common/fs/nfs/nfs_nnode_vn.c	Thu Aug 18 00:55:35 2011 +0300
+++ b/usr/src/uts/common/fs/nfs/nfs_nnode_vn.c	Thu Aug 18 00:55:36 2011 +0300
@@ -857,7 +857,7 @@
 
 	exi = checkexport4(key->nfk_fsid, key->nfk_xfid, NULL);
 	if (exi != NULL)
-		vp = nfs41_fhtovp_exi(fh, exi, &stat);
+		vp = nfs41_fhtovp(fh, exi, &stat);
 	if ((exi == NULL) || (vp == NULL)) {
 		rc = ESTALE;
 		goto out;
--- a/usr/src/uts/common/nfs/nfs41_filehandle.h	Thu Aug 18 00:55:35 2011 +0300
+++ b/usr/src/uts/common/nfs/nfs41_filehandle.h	Thu Aug 18 00:55:36 2011 +0300
@@ -78,8 +78,7 @@
 #define	FH41_ATTRDIR	2
 
 #ifndef USE_FOR_SNOOP
-extern vnode_t *nfs41_fhtovp(nfs_fh4 *, compound_state_t *);
-extern vnode_t *nfs41_fhtovp_exi(nfs_fh4 *, struct exportinfo *, nfsstat4 *);
+extern vnode_t *nfs41_fhtovp(nfs_fh4 *, struct exportinfo *, nfsstat4 *);
 extern int mknfs41_fh(nfs_fh4 *, vnode_t *, struct exportinfo *);
 #endif