Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206428
b: refs/heads/master
c: 9303bbd
h: refs/heads/master
v: v3
  • Loading branch information
Benny Halevy authored and J. Bruce Fields committed Jun 22, 2010
1 parent 8b2414b commit 7c81994
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 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: 4731030d58a146630f5e8a0519661a5344a60f45
refs/heads/master: 9303bbd3de3b25061de11e4d8c891fa9592fad8c
16 changes: 13 additions & 3 deletions trunk/fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,16 @@ nfs_cb_stat_to_errno(int stat)
* XDR encode
*/

static void
encode_stateid(struct xdr_stream *xdr, stateid_t *sid)
{
__be32 *p;

RESERVE_SPACE(sizeof(stateid_t));
WRITE32(sid->si_generation);
WRITEMEM(&sid->si_opaque, sizeof(stateid_opaque_t));
}

static void
encode_cb_compound_hdr(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr)
{
Expand All @@ -227,10 +237,10 @@ encode_cb_recall(struct xdr_stream *xdr, struct nfs4_delegation *dp,
__be32 *p;
int len = dp->dl_fh.fh_size;

RESERVE_SPACE(12+sizeof(dp->dl_stateid) + len);
RESERVE_SPACE(4);
WRITE32(OP_CB_RECALL);
WRITE32(dp->dl_stateid.si_generation);
WRITEMEM(&dp->dl_stateid.si_opaque, sizeof(stateid_opaque_t));
encode_stateid(xdr, &dp->dl_stateid);
RESERVE_SPACE(8 + (XDR_QUADLEN(len) << 2));
WRITE32(0); /* truncate optimization not implemented */
WRITE32(len);
WRITEMEM(&dp->dl_fh.fh_base, len);
Expand Down

0 comments on commit 7c81994

Please sign in to comment.