svn commit: r259801 - in head/sys/fs: nfs nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Tue Dec 24 00:48:40 UTC 2013
Author: rmacklem
Date: Tue Dec 24 00:48:39 2013
New Revision: 259801
URL: http://svnweb.freebsd.org/changeset/base/259801
Log:
The NFSv4 client was passing both the p and cred arguments to
nfsv4_fillattr() as NULLs for the Getattr callback. This caused
nfsv4_fillattr() to not fill in the Change attribute for the reply.
I believe this was a violation of the RFC, but had little effect on
server behaviour. This patch passes a non-NULL p argument to fix this.
MFC after: 1 week
Modified:
head/sys/fs/nfs/nfs_commonsubs.c
head/sys/fs/nfsclient/nfs_clstate.c
Modified: head/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonsubs.c Mon Dec 23 23:50:18 2013 (r259800)
+++ head/sys/fs/nfs/nfs_commonsubs.c Tue Dec 24 00:48:39 2013 (r259801)
@@ -2011,7 +2011,12 @@ nfsv4_fillattr(struct nfsrv_descript *nd
* First, set the bits that can be filled and get fsinfo.
*/
NFSSET_ATTRBIT(retbitp, attrbitp);
- /* If p and cred are NULL, it is a client side call */
+ /*
+ * If both p and cred are NULL, it is a client side setattr call.
+ * If both p and cred are not NULL, it is a server side reply call.
+ * If p is not NULL and cred is NULL, it is a client side callback
+ * reply call.
+ */
if (p == NULL && cred == NULL) {
NFSCLRNOTSETABLE_ATTRBIT(retbitp);
aclp = saclp;
Modified: head/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clstate.c Mon Dec 23 23:50:18 2013 (r259800)
+++ head/sys/fs/nfsclient/nfs_clstate.c Tue Dec 24 00:48:39 2013 (r259801)
@@ -3279,7 +3279,7 @@ nfscl_docb(struct nfsrv_descript *nd, NF
FREE((caddr_t)nfhp, M_NFSFH);
if (!error)
(void) nfsv4_fillattr(nd, NULL, NULL, NULL, &va,
- NULL, 0, &rattrbits, NULL, NULL, 0, 0, 0, 0,
+ NULL, 0, &rattrbits, NULL, p, 0, 0, 0, 0,
(uint64_t)0);
break;
case NFSV4OP_CBRECALL:
More information about the svn-src-head
mailing list