Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367283
b: refs/heads/master
c: d9fc661
h: refs/heads/master
i:
  367281: 971cf3a
  367279: bdf8c04
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 25, 2013
1 parent cd91d6f commit 74e377e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a1c089345a0f00ad0229bf895bf0e94d101f059
refs/heads/master: d9fc6619ca98943d56d2931ce9e4caa4039fd0f1
23 changes: 23 additions & 0 deletions trunk/fs/nfs/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,23 @@ static inline void encode_claim_delegate_cur(struct xdr_stream *xdr, const struc
encode_string(xdr, name->len, name->name);
}

static inline void encode_claim_fh(struct xdr_stream *xdr)
{
__be32 *p;

p = reserve_space(xdr, 4);
*p = cpu_to_be32(NFS4_OPEN_CLAIM_FH);
}

static inline void encode_claim_delegate_cur_fh(struct xdr_stream *xdr, const nfs4_stateid *stateid)
{
__be32 *p;

p = reserve_space(xdr, 4);
*p = cpu_to_be32(NFS4_OPEN_CLAIM_DELEG_CUR_FH);
encode_nfs4_stateid(xdr, stateid);
}

static void encode_open(struct xdr_stream *xdr, const struct nfs_openargs *arg, struct compound_hdr *hdr)
{
encode_op_hdr(xdr, OP_OPEN, decode_open_maxsz, hdr);
Expand All @@ -1474,6 +1491,12 @@ static void encode_open(struct xdr_stream *xdr, const struct nfs_openargs *arg,
case NFS4_OPEN_CLAIM_DELEGATE_CUR:
encode_claim_delegate_cur(xdr, arg->name, &arg->u.delegation);
break;
case NFS4_OPEN_CLAIM_FH:
encode_claim_fh(xdr);
break;
case NFS4_OPEN_CLAIM_DELEG_CUR_FH:
encode_claim_delegate_cur_fh(xdr, &arg->u.delegation);
break;
default:
BUG();
}
Expand Down

0 comments on commit 74e377e

Please sign in to comment.