Fix the NFSv4.2 extended attribute support for remove extended attrbute.

I missed the "atomic" field of the RemoveExtendedAttribute operation's
reply when I implemented it. It worked between FreeBSD client and server,
since it was missed for both, but it did not conform to RFC 8276.
This patch adds the field for both client and server.

Thanks go to Frank for doing interoperability testing of the extended
attribute support against patches for Linux.

Submitted by:	Frank van der Linden <fllinden@amazon.com>
Reported by:	Frank van der Linden <fllinden@amazon.com>
This commit is contained in:
rmacklem 2020-04-15 21:27:52 +00:00
parent d4728d99b5
commit d1c3089e5c
2 changed files with 3 additions and 2 deletions

View File

@ -8432,7 +8432,7 @@ nfsrpc_rmextattr(vnode_t vp, const char *name, struct nfsvattr *nap,
return (error);
if (nd->nd_repstat == 0) {
/* Just skip over the reply and Getattr op status. */
NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_HYPER + 2 *
NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_HYPER + 3 *
NFSX_UNSIGNED);
error = nfsm_loadattr(nd, nap);
if (error == 0)

View File

@ -5729,7 +5729,8 @@ nfsrvd_rmxattr(struct nfsrv_descript *nd, __unused int isdgram,
if (nd->nd_repstat == 0)
nd->nd_repstat = nfsvno_getattr(vp, &nva, nd, p, 1, &attrbits);
if (nd->nd_repstat == 0) {
NFSM_BUILD(tl, uint32_t *, 2 * NFSX_HYPER);
NFSM_BUILD(tl, uint32_t *, 2 * NFSX_HYPER + NFSX_UNSIGNED);
*tl++ = newnfs_true;
txdr_hyper(ova.na_filerev, tl); tl += 2;
txdr_hyper(nva.na_filerev, tl);
}