NFSD: Replace READ* macros in nfsd4_decode_fattr()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 3 Nov 2020 17:56:05 +0000 (12:56 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 30 Nov 2020 19:46:37 +0000 (14:46 -0500)
commitd1c263a031e876ac3ca5223c728e4d98ed50b3c0
tree156ea8dfd58574386fd9e6df7a84440b9fe9fbe6
parent66f0476c704c86d44aa9da19d4753df66f2dbc96
NFSD: Replace READ* macros in nfsd4_decode_fattr()

Let's be more careful to avoid overrunning the memory that backs
the bitmap array. This requires updating the synopsis of
nfsd4_decode_fattr().

Bruce points out that a server needs to be careful to return nfs_ok
when a client presents bitmap bits the server doesn't support. This
includes bits in bitmap words the server might not yet support.

The current READ* based implementation is good about that, but that
requirement hasn't been documented.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4xdr.c