NFSD: Use a bitmask loop to encode FATTR4 results
authorChuck Lever <chuck.lever@oracle.com>
Mon, 18 Sep 2023 14:02:12 +0000 (10:02 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 16 Oct 2023 16:44:27 +0000 (12:44 -0400)
commitfce7913b13d0270bcf926f986b7ef329e2e56eec
treee91620e9a1f1dc154f27b69c81a343efe63a70e1
parentbe46e695fb95c8acfb342f3182595aaad45301d5
NFSD: Use a bitmask loop to encode FATTR4 results

The fattr4 encoder is now structured like the COMPOUND op encoder:
one function for each individual attribute, called by bit number.
Benefits include:

- The individual attributes are now guaranteed to be encoded in
  bitmask order into the send buffer

- There can be no unwanted side effects between attribute encoders

- The code now clearly documents which attributes are /not/
  implemented on this server

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4xdr.c