Date: Wed, 1 Jan 2014 22:35:12 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260172 - in stable/9/sys/fs: nfs nfsclient Message-ID: <201401012235.s01MZCeO067285@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Wed Jan 1 22:35:11 2014 New Revision: 260172 URL: http://svnweb.freebsd.org/changeset/base/260172 Log: MFC: r259801 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. Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c stable/9/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/9/sys/fs/nfs/nfs_commonsubs.c Wed Jan 1 22:22:00 2014 (r260171) +++ stable/9/sys/fs/nfs/nfs_commonsubs.c Wed Jan 1 22:35:11 2014 (r260172) @@ -1992,7 +1992,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: stable/9/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clstate.c Wed Jan 1 22:22:00 2014 (r260171) +++ stable/9/sys/fs/nfsclient/nfs_clstate.c Wed Jan 1 22:35:11 2014 (r260172) @@ -3093,7 +3093,7 @@ nfscl_docb(struct nfsrv_descript *nd, NF NFSATTRBIT_CHANGE); } (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); if (!ret) vrele(vp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401012235.s01MZCeO067285>