Commit 2460ba57 authored by Benny Halevy's avatar Benny Halevy Committed by Trond Myklebust

nfs: nfs4xdr: simplify decode_exchange_id by reusing decode_opaque_inline

Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 99398d06
...@@ -4144,6 +4144,7 @@ static int decode_exchange_id(struct xdr_stream *xdr, ...@@ -4144,6 +4144,7 @@ static int decode_exchange_id(struct xdr_stream *xdr,
{ {
__be32 *p; __be32 *p;
uint32_t dummy; uint32_t dummy;
char *dummy_str;
int status; int status;
struct nfs_client *clp = res->client; struct nfs_client *clp = res->client;
...@@ -4166,19 +4167,19 @@ static int decode_exchange_id(struct xdr_stream *xdr, ...@@ -4166,19 +4167,19 @@ static int decode_exchange_id(struct xdr_stream *xdr,
READ_BUF(8); READ_BUF(8);
/* Throw away Major id */ /* Throw away Major id */
READ_BUF(4); status = decode_opaque_inline(xdr, &dummy, &dummy_str);
dummy = be32_to_cpup(p++); if (unlikely(status))
READ_BUF(dummy); return status;
/* Throw away server_scope */ /* Throw away server_scope */
READ_BUF(4); status = decode_opaque_inline(xdr, &dummy, &dummy_str);
dummy = be32_to_cpup(p++); if (unlikely(status))
READ_BUF(dummy); return status;
/* Throw away Implementation id array */ /* Throw away Implementation id array */
READ_BUF(4); status = decode_opaque_inline(xdr, &dummy, &dummy_str);
dummy = be32_to_cpup(p++); if (unlikely(status))
READ_BUF(dummy); return status;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment