diff options
-rw-r--r-- | fs/nfs/nfs4xdr.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index fbdad9e1719f..79210d23f607 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -414,7 +414,7 @@ static int nfs4_stat_to_errno(int); | |||
414 | #define decode_test_stateid_maxsz (op_decode_hdr_maxsz + 2 + 1) | 414 | #define decode_test_stateid_maxsz (op_decode_hdr_maxsz + 2 + 1) |
415 | #define encode_free_stateid_maxsz (op_encode_hdr_maxsz + 1 + \ | 415 | #define encode_free_stateid_maxsz (op_encode_hdr_maxsz + 1 + \ |
416 | XDR_QUADLEN(NFS4_STATEID_SIZE)) | 416 | XDR_QUADLEN(NFS4_STATEID_SIZE)) |
417 | #define decode_free_stateid_maxsz (op_decode_hdr_maxsz + 1) | 417 | #define decode_free_stateid_maxsz (op_decode_hdr_maxsz) |
418 | #else /* CONFIG_NFS_V4_1 */ | 418 | #else /* CONFIG_NFS_V4_1 */ |
419 | #define encode_sequence_maxsz 0 | 419 | #define encode_sequence_maxsz 0 |
420 | #define decode_sequence_maxsz 0 | 420 | #define decode_sequence_maxsz 0 |
@@ -5966,21 +5966,8 @@ out: | |||
5966 | static int decode_free_stateid(struct xdr_stream *xdr, | 5966 | static int decode_free_stateid(struct xdr_stream *xdr, |
5967 | struct nfs41_free_stateid_res *res) | 5967 | struct nfs41_free_stateid_res *res) |
5968 | { | 5968 | { |
5969 | __be32 *p; | 5969 | res->status = decode_op_hdr(xdr, OP_FREE_STATEID); |
5970 | int status; | ||
5971 | |||
5972 | status = decode_op_hdr(xdr, OP_FREE_STATEID); | ||
5973 | if (status) | ||
5974 | return status; | ||
5975 | |||
5976 | p = xdr_inline_decode(xdr, 4); | ||
5977 | if (unlikely(!p)) | ||
5978 | goto out_overflow; | ||
5979 | res->status = be32_to_cpup(p++); | ||
5980 | return res->status; | 5970 | return res->status; |
5981 | out_overflow: | ||
5982 | print_overflow_msg(__func__, xdr); | ||
5983 | return -EIO; | ||
5984 | } | 5971 | } |
5985 | #endif /* CONFIG_NFS_V4_1 */ | 5972 | #endif /* CONFIG_NFS_V4_1 */ |
5986 | 5973 | ||