diff options
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 3cbdd0c80a2d..8e496887ec61 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -71,8 +71,8 @@ static int nfs4_stat_to_errno(int); | |||
71 | /* lock,open owner id: | 71 | /* lock,open owner id: |
72 | * we currently use size 2 (u64) out of (NFS4_OPAQUE_LIMIT >> 2) | 72 | * we currently use size 2 (u64) out of (NFS4_OPAQUE_LIMIT >> 2) |
73 | */ | 73 | */ |
74 | #define open_owner_id_maxsz (1 + 4) | 74 | #define open_owner_id_maxsz (1 + 1 + 4) |
75 | #define lock_owner_id_maxsz (1 + 4) | 75 | #define lock_owner_id_maxsz (1 + 1 + 4) |
76 | #define decode_lockowner_maxsz (1 + XDR_QUADLEN(IDMAP_NAMESZ)) | 76 | #define decode_lockowner_maxsz (1 + XDR_QUADLEN(IDMAP_NAMESZ)) |
77 | #define compound_encode_hdr_maxsz (3 + (NFS4_MAXTAGLEN >> 2)) | 77 | #define compound_encode_hdr_maxsz (3 + (NFS4_MAXTAGLEN >> 2)) |
78 | #define compound_decode_hdr_maxsz (3 + (NFS4_MAXTAGLEN >> 2)) | 78 | #define compound_decode_hdr_maxsz (3 + (NFS4_MAXTAGLEN >> 2)) |
@@ -1088,10 +1088,11 @@ static void encode_lockowner(struct xdr_stream *xdr, const struct nfs_lowner *lo | |||
1088 | { | 1088 | { |
1089 | __be32 *p; | 1089 | __be32 *p; |
1090 | 1090 | ||
1091 | p = reserve_space(xdr, 28); | 1091 | p = reserve_space(xdr, 32); |
1092 | p = xdr_encode_hyper(p, lowner->clientid); | 1092 | p = xdr_encode_hyper(p, lowner->clientid); |
1093 | *p++ = cpu_to_be32(16); | 1093 | *p++ = cpu_to_be32(20); |
1094 | p = xdr_encode_opaque_fixed(p, "lock id:", 8); | 1094 | p = xdr_encode_opaque_fixed(p, "lock id:", 8); |
1095 | *p++ = cpu_to_be32(lowner->s_dev); | ||
1095 | xdr_encode_hyper(p, lowner->id); | 1096 | xdr_encode_hyper(p, lowner->id); |
1096 | } | 1097 | } |
1097 | 1098 | ||
@@ -1210,10 +1211,11 @@ static inline void encode_openhdr(struct xdr_stream *xdr, const struct nfs_opena | |||
1210 | *p++ = cpu_to_be32(OP_OPEN); | 1211 | *p++ = cpu_to_be32(OP_OPEN); |
1211 | *p = cpu_to_be32(arg->seqid->sequence->counter); | 1212 | *p = cpu_to_be32(arg->seqid->sequence->counter); |
1212 | encode_share_access(xdr, arg->fmode); | 1213 | encode_share_access(xdr, arg->fmode); |
1213 | p = reserve_space(xdr, 28); | 1214 | p = reserve_space(xdr, 32); |
1214 | p = xdr_encode_hyper(p, arg->clientid); | 1215 | p = xdr_encode_hyper(p, arg->clientid); |
1215 | *p++ = cpu_to_be32(16); | 1216 | *p++ = cpu_to_be32(20); |
1216 | p = xdr_encode_opaque_fixed(p, "open id:", 8); | 1217 | p = xdr_encode_opaque_fixed(p, "open id:", 8); |
1218 | *p++ = cpu_to_be32(arg->server->s_dev); | ||
1217 | xdr_encode_hyper(p, arg->id); | 1219 | xdr_encode_hyper(p, arg->id); |
1218 | } | 1220 | } |
1219 | 1221 | ||