summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2014-02-27 02:16:27 +0400
committerJ. Bruce Fields <bfields@redhat.com>2014-05-28 22:52:37 +0400
commitdd97fddedc251eb423408d89f2947eff9c4ea3c1 (patch)
tree7062237b8685ee9b7cc586748b213c7edf6ce3cc /fs/nfsd/nfs4state.c
parentf46d382a749874e1b29cfb34d4ccf283eae4fffa (diff)
downloadlinux-dd97fddedc251eb423408d89f2947eff9c4ea3c1.tar.xz
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/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 14bfb5568715..b06f9a00ff8d 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1618,6 +1618,7 @@ nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp,
struct nfsd4_sequence *seq)
{
struct nfsd4_slot *slot = resp->cstate.slot;
+ struct kvec *head = resp->xdr.iov;
__be32 status;
dprintk("--> %s slot %p\n", __func__, slot);
@@ -1631,6 +1632,8 @@ nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp,
resp->opcnt = slot->sl_opcnt;
resp->xdr.p = resp->cstate.datap + XDR_QUADLEN(slot->sl_datalen);
+ head->iov_len = (void *)resp->xdr.p - head->iov_base;
+ resp->xdr.buf->len = head->iov_len;
status = slot->sl_status;
return status;