From 9adbf11ba6174c2424b2752431d406c2a2ec6252 Mon Sep 17 00:00:00 2001 From: rmacklem Date: Sun, 13 May 2012 20:28:43 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.freebsd.org/base/stable/8@235417 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/fs/nfsclient/nfs_clvnops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 48bcd531c..872b45e83 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -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); } -- 2.45.0