Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jul 2011 03:44:05 +0000 (UTC)
From:      Zack Kirsch <zack@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224121 - head/sys/fs/nfs
Message-ID:  <201107170344.p6H3i5S5056414@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zack
Date: Sun Jul 17 03:44:05 2011
New Revision: 224121
URL: http://svn.freebsd.org/changeset/base/224121

Log:
  Revert revision 224079 as Rick pointed out that I would be calling VOP_PATHCONF
  without the vnode lock held.
  
  Implicitly approved by: zml (mentor)

Modified:
  head/sys/fs/nfs/nfs_commonport.c
  head/sys/fs/nfs/nfs_commonsubs.c

Modified: head/sys/fs/nfs/nfs_commonport.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonport.c	Sun Jul 17 01:23:50 2011	(r224120)
+++ head/sys/fs/nfs/nfs_commonport.c	Sun Jul 17 03:44:05 2011	(r224121)
@@ -554,7 +554,7 @@ nfs_supportsnfsv4acls(struct vnode *vp)
 
 	if (nfsrv_useacl == 0)
 		return (0);
-	error = nfsvno_pathconf(vp, _PC_ACL_NFS4, &retval, NULL, NULL);
+	error = VOP_PATHCONF(vp, _PC_ACL_NFS4, &retval);
 	if (error == 0 && retval != 0)
 		return (1);
 	return (0);

Modified: head/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonsubs.c	Sun Jul 17 01:23:50 2011	(r224120)
+++ head/sys/fs/nfs/nfs_commonsubs.c	Sun Jul 17 03:44:05 2011	(r224121)
@@ -795,7 +795,6 @@ nfsv4_loadattr(struct nfsrv_descript *nd
 	struct dqblk dqb;
 	uid_t savuid;
 #endif
-	register_t chownres;
 
 	if (compare) {
 		retnotsup = 0;
@@ -1038,7 +1037,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd
 				    acl_free(naclp);
 				    goto nfsmout;
 				}
-				if (aceerr || nfsrv_compareacl(aclp, naclp))
+				if (aceerr || aclp == NULL ||
+				    nfsrv_compareacl(aclp, naclp))
 				    *retcmpp = NFSERR_NOTSAME;
 				acl_free(naclp);
 			    } else {
@@ -1128,12 +1128,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd
 			NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
 			if (compare) {
 				if (!(*retcmpp)) {
-					error = nfsvno_pathconf(vp,
-					    _PC_CHOWN_RESTRICTED, &chownres,
-					    nd->nd_cred, p);
-					if (*tl != (chownres != 0 ?
-					    newnfs_true : newnfs_false))
-						*retcmpp = NFSERR_NOTSAME;
+				    if (*tl != newnfs_true)
+					*retcmpp = NFSERR_NOTSAME;
 				}
 			} else if (pc != NULL) {
 				pc->pc_chownrestricted =
@@ -1987,7 +1983,6 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 	struct dqblk dqb;
 	uid_t savuid;
 #endif
-	register_t chownres;
 
 	/*
 	 * First, set the bits that can be filled and get fsinfo.
@@ -2167,9 +2162,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 			break;
 		case NFSATTRBIT_CHOWNRESTRICTED:
 			NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
-			error = nfsvno_pathconf(vp, _PC_CHOWN_RESTRICTED,
-			    &chownres, nd->nd_cred, p);
-			*tl = (chownres ? newnfs_true : newnfs_false);
+			*tl = newnfs_true;
 			retnum += NFSX_UNSIGNED;
 			break;
 		case NFSATTRBIT_FILEHANDLE:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107170344.p6H3i5S5056414>