Commit 9993a663 authored by Chuck Lever's avatar Chuck Lever

NFSD: Clean up nfs4svc_encode_compoundres()

In today's Linux NFS server implementation, the NFS dispatcher
initializes each XDR result stream, and the NFSv4 .pc_func and
.pc_encode methods all use xdr_stream-based encoding. This keeps
rq_res.len automatically updated. There is no longer a need for
the WARN_ON_ONCE() check in nfs4svc_encode_compoundres().
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent b8ab2a6f
...@@ -5459,12 +5459,8 @@ bool ...@@ -5459,12 +5459,8 @@ bool
nfs4svc_encode_compoundres(struct svc_rqst *rqstp, struct xdr_stream *xdr) nfs4svc_encode_compoundres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
{ {
struct nfsd4_compoundres *resp = rqstp->rq_resp; struct nfsd4_compoundres *resp = rqstp->rq_resp;
struct xdr_buf *buf = xdr->buf;
__be32 *p; __be32 *p;
WARN_ON_ONCE(buf->len != buf->head[0].iov_len + buf->page_len +
buf->tail[0].iov_len);
/* /*
* Send buffer space for the following items is reserved * Send buffer space for the following items is reserved
* at the top of nfsd4_proc_compound(). * at the top of nfsd4_proc_compound().
......
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