aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 1f7781d636ae..873b62f209ea 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1324,14 +1324,14 @@ static void encode_putrootfh(struct xdr_stream *xdr, struct compound_hdr *hdr)
1324 hdr->replen += decode_putrootfh_maxsz; 1324 hdr->replen += decode_putrootfh_maxsz;
1325} 1325}
1326 1326
1327static void encode_stateid(struct xdr_stream *xdr, const struct nfs_open_context *ctx) 1327static void encode_stateid(struct xdr_stream *xdr, const struct nfs_open_context *ctx, const struct nfs_lock_context *l_ctx)
1328{ 1328{
1329 nfs4_stateid stateid; 1329 nfs4_stateid stateid;
1330 __be32 *p; 1330 __be32 *p;
1331 1331
1332 p = reserve_space(xdr, NFS4_STATEID_SIZE); 1332 p = reserve_space(xdr, NFS4_STATEID_SIZE);
1333 if (ctx->state != NULL) { 1333 if (ctx->state != NULL) {
1334 nfs4_copy_stateid(&stateid, ctx->state, ctx->lockowner); 1334 nfs4_copy_stateid(&stateid, ctx->state, l_ctx->lockowner);
1335 xdr_encode_opaque_fixed(p, stateid.data, NFS4_STATEID_SIZE); 1335 xdr_encode_opaque_fixed(p, stateid.data, NFS4_STATEID_SIZE);
1336 } else 1336 } else
1337 xdr_encode_opaque_fixed(p, zero_stateid.data, NFS4_STATEID_SIZE); 1337 xdr_encode_opaque_fixed(p, zero_stateid.data, NFS4_STATEID_SIZE);
@@ -1344,7 +1344,7 @@ static void encode_read(struct xdr_stream *xdr, const struct nfs_readargs *args,
1344 p = reserve_space(xdr, 4); 1344 p = reserve_space(xdr, 4);
1345 *p = cpu_to_be32(OP_READ); 1345 *p = cpu_to_be32(OP_READ);
1346 1346
1347 encode_stateid(xdr, args->context); 1347 encode_stateid(xdr, args->context, args->lock_context);
1348 1348
1349 p = reserve_space(xdr, 12); 1349 p = reserve_space(xdr, 12);
1350 p = xdr_encode_hyper(p, args->offset); 1350 p = xdr_encode_hyper(p, args->offset);
@@ -1523,7 +1523,7 @@ static void encode_write(struct xdr_stream *xdr, const struct nfs_writeargs *arg
1523 p = reserve_space(xdr, 4); 1523 p = reserve_space(xdr, 4);
1524 *p = cpu_to_be32(OP_WRITE); 1524 *p = cpu_to_be32(OP_WRITE);
1525 1525
1526 encode_stateid(xdr, args->context); 1526 encode_stateid(xdr, args->context, args->lock_context);
1527 1527
1528 p = reserve_space(xdr, 16); 1528 p = reserve_space(xdr, 16);
1529 p = xdr_encode_hyper(p, args->offset); 1529 p = xdr_encode_hyper(p, args->offset);