Commit b609ad60 authored by Chuck Lever's avatar Chuck Lever

NFSD: Clean up nfsd4_encode_offset_status()

Use modern XDR encoder utilities.
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 21d316a7
......@@ -5189,14 +5189,15 @@ nfsd4_encode_offload_status(struct nfsd4_compoundres *resp, __be32 nfserr,
{
struct nfsd4_offload_status *os = &u->offload_status;
struct xdr_stream *xdr = resp->xdr;
__be32 *p;
p = xdr_reserve_space(xdr, 8 + 4);
if (!p)
/* osr_count */
nfserr = nfsd4_encode_length4(xdr, os->count);
if (nfserr != nfs_ok)
return nfserr;
/* osr_complete<1> */
if (xdr_stream_encode_u32(xdr, 0) != XDR_UNIT)
return nfserr_resource;
p = xdr_encode_hyper(p, os->count);
*p++ = cpu_to_be32(0);
return nfserr;
return nfs_ok;
}
static __be32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment