summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-04 18:13:57 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-06 10:32:47 -0500
commit2d2f24add1ff903ff8e0ce61c5c05635cc636985 (patch)
tree132ddb133179b95931d42a19e79d25f2db33339c /fs/nfs/nfs4xdr.c
parentf597c53790f662662281b82b7692a22d2a4d4afa (diff)
NFSv4: Simplify the struct nfs4_stateid
Replace the union with the common struct stateid4 as defined in both RFC3530 and RFC5661. This makes it easier to access the sequence id, which will again make implementing support for parallel OPEN calls easier. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 38736dca1b18..76ef98632839 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -930,7 +930,7 @@ static void encode_nops(struct compound_hdr *hdr)
930 930
931static void encode_nfs4_stateid(struct xdr_stream *xdr, const nfs4_stateid *stateid) 931static void encode_nfs4_stateid(struct xdr_stream *xdr, const nfs4_stateid *stateid)
932{ 932{
933 encode_opaque_fixed(xdr, stateid->data, NFS4_STATEID_SIZE); 933 encode_opaque_fixed(xdr, stateid, NFS4_STATEID_SIZE);
934} 934}
935 935
936static void encode_nfs4_verifier(struct xdr_stream *xdr, const nfs4_verifier *verf) 936static void encode_nfs4_verifier(struct xdr_stream *xdr, const nfs4_verifier *verf)
@@ -1548,7 +1548,7 @@ static void encode_open_stateid(struct xdr_stream *xdr, const struct nfs_open_co
1548 if (ctx->state != NULL) { 1548 if (ctx->state != NULL) {
1549 nfs4_select_rw_stateid(&stateid, ctx->state, l_ctx->lockowner, l_ctx->pid); 1549 nfs4_select_rw_stateid(&stateid, ctx->state, l_ctx->lockowner, l_ctx->pid);
1550 if (zero_seqid) 1550 if (zero_seqid)
1551 stateid.stateid.seqid = 0; 1551 stateid.seqid = 0;
1552 encode_nfs4_stateid(xdr, &stateid); 1552 encode_nfs4_stateid(xdr, &stateid);
1553 } else 1553 } else
1554 encode_nfs4_stateid(xdr, &zero_stateid); 1554 encode_nfs4_stateid(xdr, &zero_stateid);
@@ -4237,7 +4237,7 @@ static int decode_opaque_fixed(struct xdr_stream *xdr, void *buf, size_t len)
4237 4237
4238static int decode_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid) 4238static int decode_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid)
4239{ 4239{
4240 return decode_opaque_fixed(xdr, stateid->data, NFS4_STATEID_SIZE); 4240 return decode_opaque_fixed(xdr, stateid, NFS4_STATEID_SIZE);
4241} 4241}
4242 4242
4243static int decode_close(struct xdr_stream *xdr, struct nfs_closeres *res) 4243static int decode_close(struct xdr_stream *xdr, struct nfs_closeres *res)