nfsd: Fixes for nfsd4_encode_read_plus_data()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 11 Dec 2020 17:26:14 +0000 (12:26 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Fri, 18 Dec 2020 17:27:55 +0000 (12:27 -0500)
commit72d78717c6d06adf65d2e3dccc96d9e9dc978593
tree4c87f2c8f26629cfa81ebac19af63558ed9ae16b
parent5ee863bec794f30bdf7fdf57ce0d9f579b0d1aa3
nfsd: Fixes for nfsd4_encode_read_plus_data()

Ensure that we encode the data payload + padding, and that we truncate
the preallocated buffer to the actual read size.

Fixes: 528b84934eb9 ("NFSD: Add READ_PLUS data support")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4xdr.c