diff options
author | J. Bruce Fields <bfields@redhat.com> | 2014-02-26 17:16:27 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-05-28 14:52:37 -0400 |
commit | dd97fddedc251eb423408d89f2947eff9c4ea3c1 (patch) | |
tree | 7062237b8685ee9b7cc586748b213c7edf6ce3cc /fs/nfsd/nfs4xdr.c | |
parent | f46d382a749874e1b29cfb34d4ccf283eae4fffa (diff) | |
download | lwn-dd97fddedc251eb423408d89f2947eff9c4ea3c1.tar.gz lwn-dd97fddedc251eb423408d89f2947eff9c4ea3c1.zip |
nfsd4: no need for encode_compoundres to adjust lengths
xdr_reserve_space should now be calculating the length correctly as we
go, so there's no longer any need to fix it up here.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index e9abf5f66e8b..79b8e1ef0f39 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3789,19 +3789,13 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compo * All that remains is to write the tag and operation count... */ struct nfsd4_compound_state *cs = &resp->cstate; - struct kvec *iov; + p = resp->tagp; *p++ = htonl(resp->taglen); memcpy(p, resp->tag, resp->taglen); p += XDR_QUADLEN(resp->taglen); *p++ = htonl(resp->opcnt); - if (rqstp->rq_res.page_len) - iov = &rqstp->rq_res.tail[0]; - else - iov = &rqstp->rq_res.head[0]; - iov->iov_len = ((char *)resp->xdr.p) - (char *)iov->iov_base; - BUG_ON(iov->iov_len > PAGE_SIZE); if (nfsd4_has_session(cs)) { struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); struct nfs4_client *clp = cs->session->se_client; |