Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61864
b: refs/heads/master
c: e3a535e
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jul 19, 2007
1 parent 9dcee3f commit 513bdf7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6ac02dfaa6c423874839fe289c7320624aa9288
refs/heads/master: e3a535e1739a9da3cc316ccdfe5cd4bf84d745ac
21 changes: 11 additions & 10 deletions trunk/fs/nfs/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1201,21 +1201,11 @@ static int encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg

static int encode_readlink(struct xdr_stream *xdr, const struct nfs4_readlink *readlink, struct rpc_rqst *req)
{
struct rpc_auth *auth = req->rq_task->tk_msg.rpc_cred->cr_auth;
unsigned int replen;
__be32 *p;

RESERVE_SPACE(4);
WRITE32(OP_READLINK);

/* set up reply kvec
* toplevel_status + taglen + rescount + OP_PUTFH + status
* + OP_READLINK + status + string length = 8
*/
replen = (RPC_REPHDRSIZE + auth->au_rslack + 8) << 2;
xdr_inline_pages(&req->rq_rcv_buf, replen, readlink->pages,
readlink->pgbase, readlink->pglen);

return 0;
}

Expand Down Expand Up @@ -1781,6 +1771,8 @@ static int nfs4_xdr_enc_readlink(struct rpc_rqst *req, __be32 *p, const struct n
struct compound_hdr hdr = {
.nops = 2,
};
struct rpc_auth *auth = req->rq_task->tk_msg.rpc_cred->cr_auth;
unsigned int replen;
int status;

xdr_init_encode(&xdr, &req->rq_snd_buf, p);
Expand All @@ -1789,6 +1781,15 @@ static int nfs4_xdr_enc_readlink(struct rpc_rqst *req, __be32 *p, const struct n
if(status)
goto out;
status = encode_readlink(&xdr, args, req);

/* set up reply kvec
* toplevel_status + taglen + rescount + OP_PUTFH + status
* + OP_READLINK + status + string length = 8
*/
replen = (RPC_REPHDRSIZE + auth->au_rslack + NFS4_dec_readlink_sz) << 2;
xdr_inline_pages(&req->rq_rcv_buf, replen, args->pages,
args->pgbase, args->pglen);

out:
return status;
}
Expand Down

0 comments on commit 513bdf7

Please sign in to comment.