aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2010-01-22 12:03:08 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-02-10 08:31:01 -0500
commit9733f0d9289cbcac4fa03db0cb5aec1ab01c6bc9 (patch)
tree60cd0b76a80b71002f630cf993390228c0f9ab75 /fs/nfs
parent41f54a55480c752d9419cac5e647785cb794142e (diff)
nfs41: cleanup callback code to use __be32 type
Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/callback_proc.c15
-rw-r--r--fs/nfs/callback_xdr.c30
2 files changed, 23 insertions, 22 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index c79e18cd0e15..84761b5bb8e2 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -151,7 +151,7 @@ int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation, const n
151 * checking the used_slots bit array on the table. The lower layer guarantees 151 * checking the used_slots bit array on the table. The lower layer guarantees
152 * a single outstanding callback request at a time. 152 * a single outstanding callback request at a time.
153 */ 153 */
154static int 154static __be32
155validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args) 155validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
156{ 156{
157 struct nfs4_slot *slot; 157 struct nfs4_slot *slot;
@@ -285,11 +285,12 @@ out:
285 return status; 285 return status;
286} 286}
287 287
288unsigned nfs4_callback_sequence(struct cb_sequenceargs *args, 288__be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
289 struct cb_sequenceres *res) 289 struct cb_sequenceres *res)
290{ 290{
291 struct nfs_client *clp; 291 struct nfs_client *clp;
292 int i, status; 292 int i;
293 __be32 status;
293 294
294 status = htonl(NFS4ERR_BADSESSION); 295 status = htonl(NFS4ERR_BADSESSION);
295 clp = find_client_with_session(args->csa_addr, 4, &args->csa_sessionid); 296 clp = find_client_with_session(args->csa_addr, 4, &args->csa_sessionid);
@@ -333,10 +334,10 @@ out:
333 return status; 334 return status;
334} 335}
335 336
336unsigned nfs4_callback_recallany(struct cb_recallanyargs *args, void *dummy) 337__be32 nfs4_callback_recallany(struct cb_recallanyargs *args, void *dummy)
337{ 338{
338 struct nfs_client *clp; 339 struct nfs_client *clp;
339 int status; 340 __be32 status;
340 fmode_t flags = 0; 341 fmode_t flags = 0;
341 342
342 status = htonl(NFS4ERR_OP_NOT_IN_SESSION); 343 status = htonl(NFS4ERR_OP_NOT_IN_SESSION);
@@ -363,11 +364,11 @@ out:
363} 364}
364 365
365/* Reduce the fore channel's max_slots to the target value */ 366/* Reduce the fore channel's max_slots to the target value */
366unsigned nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy) 367__be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy)
367{ 368{
368 struct nfs_client *clp; 369 struct nfs_client *clp;
369 struct nfs4_slot_table *fc_tbl; 370 struct nfs4_slot_table *fc_tbl;
370 int status; 371 __be32 status;
371 372
372 status = htonl(NFS4ERR_OP_NOT_IN_SESSION); 373 status = htonl(NFS4ERR_OP_NOT_IN_SESSION);
373 clp = nfs_find_client(args->crsa_addr, 4); 374 clp = nfs_find_client(args->crsa_addr, 4);
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 8e66e20b59fd..db30c0b398b5 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -219,10 +219,10 @@ out:
219 219
220#if defined(CONFIG_NFS_V4_1) 220#if defined(CONFIG_NFS_V4_1)
221 221
222static unsigned decode_sessionid(struct xdr_stream *xdr, 222static __be32 decode_sessionid(struct xdr_stream *xdr,
223 struct nfs4_sessionid *sid) 223 struct nfs4_sessionid *sid)
224{ 224{
225 uint32_t *p; 225 __be32 *p;
226 int len = NFS4_MAX_SESSIONID_LEN; 226 int len = NFS4_MAX_SESSIONID_LEN;
227 227
228 p = read_buf(xdr, len); 228 p = read_buf(xdr, len);
@@ -233,12 +233,12 @@ static unsigned decode_sessionid(struct xdr_stream *xdr,
233 return 0; 233 return 0;
234} 234}
235 235
236static unsigned decode_rc_list(struct xdr_stream *xdr, 236static __be32 decode_rc_list(struct xdr_stream *xdr,
237 struct referring_call_list *rc_list) 237 struct referring_call_list *rc_list)
238{ 238{
239 uint32_t *p; 239 __be32 *p;
240 int i; 240 int i;
241 unsigned status; 241 __be32 status;
242 242
243 status = decode_sessionid(xdr, &rc_list->rcl_sessionid); 243 status = decode_sessionid(xdr, &rc_list->rcl_sessionid);
244 if (status) 244 if (status)
@@ -271,13 +271,13 @@ out:
271 return status; 271 return status;
272} 272}
273 273
274static unsigned decode_cb_sequence_args(struct svc_rqst *rqstp, 274static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp,
275 struct xdr_stream *xdr, 275 struct xdr_stream *xdr,
276 struct cb_sequenceargs *args) 276 struct cb_sequenceargs *args)
277{ 277{
278 uint32_t *p; 278 __be32 *p;
279 int i; 279 int i;
280 unsigned status; 280 __be32 status;
281 281
282 status = decode_sessionid(xdr, &args->csa_sessionid); 282 status = decode_sessionid(xdr, &args->csa_sessionid);
283 if (status) 283 if (status)
@@ -331,11 +331,11 @@ out_free:
331 goto out; 331 goto out;
332} 332}
333 333
334static unsigned decode_recallany_args(struct svc_rqst *rqstp, 334static __be32 decode_recallany_args(struct svc_rqst *rqstp,
335 struct xdr_stream *xdr, 335 struct xdr_stream *xdr,
336 struct cb_recallanyargs *args) 336 struct cb_recallanyargs *args)
337{ 337{
338 uint32_t *p; 338 __be32 *p;
339 339
340 args->craa_addr = svc_addr(rqstp); 340 args->craa_addr = svc_addr(rqstp);
341 p = read_buf(xdr, 4); 341 p = read_buf(xdr, 4);
@@ -350,7 +350,7 @@ static unsigned decode_recallany_args(struct svc_rqst *rqstp,
350 return 0; 350 return 0;
351} 351}
352 352
353static unsigned decode_recallslot_args(struct svc_rqst *rqstp, 353static __be32 decode_recallslot_args(struct svc_rqst *rqstp,
354 struct xdr_stream *xdr, 354 struct xdr_stream *xdr,
355 struct cb_recallslotargs *args) 355 struct cb_recallslotargs *args)
356{ 356{
@@ -517,10 +517,10 @@ out:
517 517
518#if defined(CONFIG_NFS_V4_1) 518#if defined(CONFIG_NFS_V4_1)
519 519
520static unsigned encode_sessionid(struct xdr_stream *xdr, 520static __be32 encode_sessionid(struct xdr_stream *xdr,
521 const struct nfs4_sessionid *sid) 521 const struct nfs4_sessionid *sid)
522{ 522{
523 uint32_t *p; 523 __be32 *p;
524 int len = NFS4_MAX_SESSIONID_LEN; 524 int len = NFS4_MAX_SESSIONID_LEN;
525 525
526 p = xdr_reserve_space(xdr, len); 526 p = xdr_reserve_space(xdr, len);
@@ -531,11 +531,11 @@ static unsigned encode_sessionid(struct xdr_stream *xdr,
531 return 0; 531 return 0;
532} 532}
533 533
534static unsigned encode_cb_sequence_res(struct svc_rqst *rqstp, 534static __be32 encode_cb_sequence_res(struct svc_rqst *rqstp,
535 struct xdr_stream *xdr, 535 struct xdr_stream *xdr,
536 const struct cb_sequenceres *res) 536 const struct cb_sequenceres *res)
537{ 537{
538 uint32_t *p; 538 __be32 *p;
539 unsigned status = res->csr_status; 539 unsigned status = res->csr_status;
540 540
541 if (unlikely(status != 0)) 541 if (unlikely(status != 0))