Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 May 2014 22:27:04 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r265620 - stable/10/sys/fs/nfsclient
Message-ID:  <201405072227.s47MR4sQ022574@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Wed May  7 22:27:03 2014
New Revision: 265620
URL: http://svnweb.freebsd.org/changeset/base/265620

Log:
  MFC: r264842
  Modify the NFSv4 client's Pathconf RPC (actually a Getattr Op.)
  so that it only does the RPC for names that are answered by the RPC.
  Doing the RPC for other names is harmless, but unnecessary.

Modified:
  stable/10/sys/fs/nfsclient/nfs_clvnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/10/sys/fs/nfsclient/nfs_clvnops.c	Wed May  7 22:17:16 2014	(r265619)
+++ stable/10/sys/fs/nfsclient/nfs_clvnops.c	Wed May  7 22:27:03 2014	(r265620)
@@ -3430,12 +3430,15 @@ nfs_pathconf(struct vop_pathconf_args *a
 	struct thread *td = curthread;
 	int attrflag, error;
 
-	if (NFS_ISV4(vp) || (NFS_ISV3(vp) && (ap->a_name == _PC_LINK_MAX ||
+	if ((NFS_ISV34(vp) && (ap->a_name == _PC_LINK_MAX ||
 	    ap->a_name == _PC_NAME_MAX || ap->a_name == _PC_CHOWN_RESTRICTED ||
-	    ap->a_name == _PC_NO_TRUNC))) {
+	    ap->a_name == _PC_NO_TRUNC)) ||
+	    (NFS_ISV4(vp) && ap->a_name == _PC_ACL_NFS4)) {
 		/*
 		 * Since only the above 4 a_names are returned by the NFSv3
 		 * Pathconf RPC, there is no point in doing it for others.
+		 * For NFSv4, the Pathconf RPC (actually a Getattr Op.) can
+		 * be used for _PC_NFS4_ACL as well.
 		 */
 		error = nfsrpc_pathconf(vp, &pc, td->td_ucred, td, &nfsva,
 		    &attrflag, NULL);



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