svn commit: r235417 - in stable/8/sys: fs/nfsclient i386/conf

Rick Macklem rmacklem at
Sun May 13 20:28:44 UTC 2012

Author: rmacklem
Date: Sun May 13 20:28:43 2012
New Revision: 235417

  MFC: r234742
  It was reported via email that some non-FreeBSD NFS servers
  do not include file attributes in the reply to an NFS create RPC
  under certain circumstances.
  This resulted in a vnode of type VNON that was not usable.
  This patch adds an NFS getattr RPC to nfs_create() for this case,
  to fix the problem. It was tested by the person that reported
  the problem and confirmed to fix this case for their server.

Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Sun May 13 19:32:49 2012	(r235416)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Sun May 13 20:28:43 2012	(r235417)
@@ -1494,7 +1494,10 @@ again:
 		(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1);
 	if (!error) {
 		newvp = NFSTOV(np);
-		if (attrflag)
+		if (attrflag == 0)
+			error = nfsrpc_getattr(newvp, cnp->cn_cred,
+			    cnp->cn_thread, &nfsva, NULL);
+		if (error == 0)
 			error = nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL,
 			    0, 1);

More information about the svn-src-stable-8 mailing list