svn commit: r234742 - head/sys/fs/nfsclient

Rick Macklem rmacklem at FreeBSD.org
Fri Apr 27 22:23:07 UTC 2012


Author: rmacklem
Date: Fri Apr 27 22:23:06 2012
New Revision: 234742
URL: http://svn.freebsd.org/changeset/base/234742

Log:
  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.
  
  Tested by:	Steven Haber (steven.haber at isilon.com)
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsclient/nfs_clvnops.c

Modified: head/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvnops.c	Fri Apr 27 21:40:51 2012	(r234741)
+++ head/sys/fs/nfsclient/nfs_clvnops.c	Fri Apr 27 22:23:06 2012	(r234742)
@@ -1546,7 +1546,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-head mailing list