Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158597
b: refs/heads/master
c: 99398d0
h: refs/heads/master
i:
  158595: 3b17124
v: v3
  • Loading branch information
Benny Halevy authored and Trond Myklebust committed Aug 14, 2009
1 parent 143a780 commit 21bc499
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: e78291e4e07520348b0634095cf19ed3bc868965
refs/heads/master: 99398d0655ada44ae464a1c93d13cd438a306ecd
11 changes: 3 additions & 8 deletions trunk/fs/nfs/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2433,11 +2433,6 @@ static int nfs4_xdr_enc_get_lease_time(struct rpc_rqst *req, uint32_t *p,
* task to translate them into Linux-specific versions which are more
* consistent with the style used in NFSv2/v3...
*/
#define COPYMEM(x,nbytes) do { \
memcpy((x), p, nbytes); \
p += XDR_QUADLEN(nbytes); \
} while (0)

#define READ_BUF(nbytes) do { \
p = xdr_inline_decode(xdr, nbytes); \
if (unlikely(!p)) { \
Expand Down Expand Up @@ -3607,7 +3602,7 @@ static int decode_getfh(struct xdr_stream *xdr, struct nfs_fh *fh)
return -EIO;
fh->size = len;
READ_BUF(len);
COPYMEM(fh->data, len);
memcpy(fh->data, p, len);
return 0;
}

Expand Down Expand Up @@ -4097,7 +4092,7 @@ static int decode_setclientid(struct xdr_stream *xdr, struct nfs_client *clp)
if (nfserr == NFS_OK) {
READ_BUF(8 + NFS4_VERIFIER_SIZE);
p = xdr_decode_hyper(p, &clp->cl_clientid);
COPYMEM(clp->cl_confirm.data, NFS4_VERIFIER_SIZE);
memcpy(clp->cl_confirm.data, p, NFS4_VERIFIER_SIZE);
} else if (nfserr == NFSERR_CLID_INUSE) {
uint32_t len;

Expand Down Expand Up @@ -4134,7 +4129,7 @@ static int decode_write(struct xdr_stream *xdr, struct nfs_writeres *res)
READ_BUF(16);
res->count = be32_to_cpup(p++);
res->verf->committed = be32_to_cpup(p++);
COPYMEM(res->verf->verifier, 8);
memcpy(res->verf->verifier, p, 8);
return 0;
}

Expand Down

0 comments on commit 21bc499

Please sign in to comment.