aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2009-08-14 10:20:10 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-08-14 14:02:20 -0400
commit2460ba57c49c36dfef0b62c929461de09240fe17 (patch)
tree27328a95049a11b6e817c6e168bdc4388463cebf /fs/nfs
parent99398d0655ada44ae464a1c93d13cd438a306ecd (diff)
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,
4144{ 4144{
4145 __be32 *p; 4145 __be32 *p;
4146 uint32_t dummy; 4146 uint32_t dummy;
4147 char *dummy_str;
4147 int status; 4148 int status;
4148 struct nfs_client *clp = res->client; 4149 struct nfs_client *clp = res->client;
4149 4150
@@ -4166,19 +4167,19 @@ static int decode_exchange_id(struct xdr_stream *xdr,
4166 READ_BUF(8); 4167 READ_BUF(8);
4167 4168
4168 /* Throw away Major id */ 4169 /* Throw away Major id */
4169 READ_BUF(4); 4170 status = decode_opaque_inline(xdr, &dummy, &dummy_str);
4170 dummy = be32_to_cpup(p++); 4171 if (unlikely(status))
4171 READ_BUF(dummy); 4172 return status;
4172 4173
4173 /* Throw away server_scope */ 4174 /* Throw away server_scope */
4174 READ_BUF(4); 4175 status = decode_opaque_inline(xdr, &dummy, &dummy_str);
4175 dummy = be32_to_cpup(p++); 4176 if (unlikely(status))
4176 READ_BUF(dummy); 4177 return status;
4177 4178
4178 /* Throw away Implementation id array */ 4179 /* Throw away Implementation id array */
4179 READ_BUF(4); 4180 status = decode_opaque_inline(xdr, &dummy, &dummy_str);
4180 dummy = be32_to_cpup(p++); 4181 if (unlikely(status))
4181 READ_BUF(dummy); 4182 return status;
4182 4183
4183 return 0; 4184 return 0;
4184} 4185}