summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2009-08-14 16:20:10 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-08-14 20:02:20 +0200
commit2460ba57c49c36dfef0b62c929461de09240fe17 (patch)
tree27328a95049a11b6e817c6e168bdc4388463cebf /fs/nfs
parentnfs: nfs4xdr: get rid of COPYMEM (diff)
downloadlinux-2460ba57c49c36dfef0b62c929461de09240fe17.tar.xz
linux-2460ba57c49c36dfef0b62c929461de09240fe17.zip
nfs: nfs4xdr: simplify decode_exchange_id by reusing decode_opaque_inline
Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4xdr.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index f69aafc23d44..3f49da0960e3 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4144,6 +4144,7 @@ static int decode_exchange_id(struct xdr_stream *xdr,
{
__be32 *p;
uint32_t dummy;
+ char *dummy_str;
int status;
struct nfs_client *clp = res->client;
@@ -4166,19 +4167,19 @@ static int decode_exchange_id(struct xdr_stream *xdr,
READ_BUF(8);
/* Throw away Major id */
- READ_BUF(4);
- dummy = be32_to_cpup(p++);
- READ_BUF(dummy);
+ status = decode_opaque_inline(xdr, &dummy, &dummy_str);
+ if (unlikely(status))
+ return status;
/* Throw away server_scope */
- READ_BUF(4);
- dummy = be32_to_cpup(p++);
- READ_BUF(dummy);
+ status = decode_opaque_inline(xdr, &dummy, &dummy_str);
+ if (unlikely(status))
+ return status;
/* Throw away Implementation id array */
- READ_BUF(4);
- dummy = be32_to_cpup(p++);
- READ_BUF(dummy);
+ status = decode_opaque_inline(xdr, &dummy, &dummy_str);
+ if (unlikely(status))
+ return status;
return 0;
}