Message ID | 166171266025.21449.2692376100575745686.stgit@manet.1015granger.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fixes for server-side xdr_stream overhaul | expand |
On Sun, 2022-08-28 at 14:51 -0400, Chuck Lever wrote: > 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(). > > Signed-off-by: Chuck Lever <chuck.lever@oracle.com> > --- > fs/nfsd/nfs4xdr.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c > index 1e9690a061ec..af51e2a8ceb7 100644 > --- a/fs/nfsd/nfs4xdr.c > +++ b/fs/nfsd/nfs4xdr.c > @@ -5423,12 +5423,8 @@ bool > nfs4svc_encode_compoundres(struct svc_rqst *rqstp, struct xdr_stream *xdr) > { > struct nfsd4_compoundres *resp = rqstp->rq_resp; > - struct xdr_buf *buf = xdr->buf; > __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 > * at the top of nfsd4_proc_compound(). > > Reviewed-by: Jeff Layton <jlayton@kernel.org>
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 1e9690a061ec..af51e2a8ceb7 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -5423,12 +5423,8 @@ bool nfs4svc_encode_compoundres(struct svc_rqst *rqstp, struct xdr_stream *xdr) { struct nfsd4_compoundres *resp = rqstp->rq_resp; - struct xdr_buf *buf = xdr->buf; __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 * at the top of nfsd4_proc_compound().
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(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> --- fs/nfsd/nfs4xdr.c | 4 ---- 1 file changed, 4 deletions(-)