aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2012-04-27 22:23:06 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2012-04-27 22:23:06 +0000
commit4964d807051ced7779cc8eb20687f2b379bb6250 (patch)
tree8a4ee7b0f44db2e47d2cacba152d30afd04a478b /sys/fs
parenta607cc6d8e837770675657b8dd2a086a46f26edd (diff)
downloadsrc-4964d807051ced7779cc8eb20687f2b379bb6250.tar.gz
src-4964d807051ced7779cc8eb20687f2b379bb6250.zip
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
Notes
Notes: svn path=/head/; revision=234742
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index b8f4c2ce6a06..0687d6c6ab33 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -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);
}