NFSD: Document nfsd_setattr() fill-attributes behavior

Add an explanation to prevent the future removal of the fill-
attribute call sites in nfsd_setattr(). Some NFSv3 client
implementations don't behave correctly if wcc data is not present in
an NFSv3 SETATTR reply.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
Chuck Lever 2024-02-18 11:48:10 -05:00
parent 24d92de918
commit 7d5a352ccc
1 changed files with 7 additions and 0 deletions

View File

@ -591,6 +591,13 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
dentry, ACL_TYPE_DEFAULT,
attr->na_dpacl);
out_fill_attrs:
/*
* RFC 1813 Section 3.3.2 does not mandate that an NFS server
* returns wcc_data for SETATTR. Some client implementations
* depend on receiving wcc_data, however, to sort out partial
* updates (eg., the client requested that size and mode be
* modified, but the server changed only the file mode).
*/
fh_fill_post_attrs(fhp);
out_unlock:
inode_unlock(inode);