diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-10-20 02:28:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-20 13:26:40 -0400 |
commit | d61005a6855160091dca44b718db93fe7aa9876f (patch) | |
tree | c12a4fda48f3c3f97793c279e478ab947bcc0fe8 | |
parent | 9d787a75a00679c3ebcb88236a7af7b38a0b5932 (diff) |
[PATCH] xdr annotations: NFSv3
on-the-wire data is big-endian
[in large part pulled from Alexey's patch]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/nfs/nfs3xdr.c | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index 16556fa4effb..b4e740e4494a 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c | |||
@@ -105,14 +105,14 @@ static struct { | |||
105 | /* | 105 | /* |
106 | * Common NFS XDR functions as inlines | 106 | * Common NFS XDR functions as inlines |
107 | */ | 107 | */ |
108 | static inline u32 * | 108 | static inline __be32 * |
109 | xdr_encode_fhandle(u32 *p, struct nfs_fh *fh) | 109 | xdr_encode_fhandle(__be32 *p, struct nfs_fh *fh) |
110 | { | 110 | { |
111 | return xdr_encode_array(p, fh->data, fh->size); | 111 | return xdr_encode_array(p, fh->data, fh->size); |
112 | } | 112 | } |
113 | 113 | ||
114 | static inline u32 * | 114 | static inline __be32 * |
115 | xdr_decode_fhandle(u32 *p, struct nfs_fh *fh) | 115 | xdr_decode_fhandle(__be32 *p, struct nfs_fh *fh) |
116 | { | 116 | { |
117 | if ((fh->size = ntohl(*p++)) <= NFS3_FHSIZE) { | 117 | if ((fh->size = ntohl(*p++)) <= NFS3_FHSIZE) { |
118 | memcpy(fh->data, p, fh->size); | 118 | memcpy(fh->data, p, fh->size); |
@@ -124,24 +124,24 @@ xdr_decode_fhandle(u32 *p, struct nfs_fh *fh) | |||
124 | /* | 124 | /* |
125 | * Encode/decode time. | 125 | * Encode/decode time. |
126 | */ | 126 | */ |
127 | static inline u32 * | 127 | static inline __be32 * |
128 | xdr_encode_time3(u32 *p, struct timespec *timep) | 128 | xdr_encode_time3(__be32 *p, struct timespec *timep) |
129 | { | 129 | { |
130 | *p++ = htonl(timep->tv_sec); | 130 | *p++ = htonl(timep->tv_sec); |
131 | *p++ = htonl(timep->tv_nsec); | 131 | *p++ = htonl(timep->tv_nsec); |
132 | return p; | 132 | return p; |
133 | } | 133 | } |
134 | 134 | ||
135 | static inline u32 * | 135 | static inline __be32 * |
136 | xdr_decode_time3(u32 *p, struct timespec *timep) | 136 | xdr_decode_time3(__be32 *p, struct timespec *timep) |
137 | { | 137 | { |
138 | timep->tv_sec = ntohl(*p++); | 138 | timep->tv_sec = ntohl(*p++); |
139 | timep->tv_nsec = ntohl(*p++); | 139 | timep->tv_nsec = ntohl(*p++); |
140 | return p; | 140 | return p; |
141 | } | 141 | } |
142 | 142 | ||
143 | static u32 * | 143 | static __be32 * |
144 | xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr) | 144 | xdr_decode_fattr(__be32 *p, struct nfs_fattr *fattr) |
145 | { | 145 | { |
146 | unsigned int type, major, minor; | 146 | unsigned int type, major, minor; |
147 | int fmode; | 147 | int fmode; |
@@ -177,8 +177,8 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr) | |||
177 | return p; | 177 | return p; |
178 | } | 178 | } |
179 | 179 | ||
180 | static inline u32 * | 180 | static inline __be32 * |
181 | xdr_encode_sattr(u32 *p, struct iattr *attr) | 181 | xdr_encode_sattr(__be32 *p, struct iattr *attr) |
182 | { | 182 | { |
183 | if (attr->ia_valid & ATTR_MODE) { | 183 | if (attr->ia_valid & ATTR_MODE) { |
184 | *p++ = xdr_one; | 184 | *p++ = xdr_one; |
@@ -223,8 +223,8 @@ xdr_encode_sattr(u32 *p, struct iattr *attr) | |||
223 | return p; | 223 | return p; |
224 | } | 224 | } |
225 | 225 | ||
226 | static inline u32 * | 226 | static inline __be32 * |
227 | xdr_decode_wcc_attr(u32 *p, struct nfs_fattr *fattr) | 227 | xdr_decode_wcc_attr(__be32 *p, struct nfs_fattr *fattr) |
228 | { | 228 | { |
229 | p = xdr_decode_hyper(p, &fattr->pre_size); | 229 | p = xdr_decode_hyper(p, &fattr->pre_size); |
230 | p = xdr_decode_time3(p, &fattr->pre_mtime); | 230 | p = xdr_decode_time3(p, &fattr->pre_mtime); |
@@ -233,16 +233,16 @@ xdr_decode_wcc_attr(u32 *p, struct nfs_fattr *fattr) | |||
233 | return p; | 233 | return p; |
234 | } | 234 | } |
235 | 235 | ||
236 | static inline u32 * | 236 | static inline __be32 * |
237 | xdr_decode_post_op_attr(u32 *p, struct nfs_fattr *fattr) | 237 | xdr_decode_post_op_attr(__be32 *p, struct nfs_fattr *fattr) |
238 | { | 238 | { |
239 | if (*p++) | 239 | if (*p++) |
240 | p = xdr_decode_fattr(p, fattr); | 240 | p = xdr_decode_fattr(p, fattr); |
241 | return p; | 241 | return p; |
242 | } | 242 | } |
243 | 243 | ||
244 | static inline u32 * | 244 | static inline __be32 * |
245 | xdr_decode_pre_op_attr(u32 *p, struct nfs_fattr *fattr) | 245 | xdr_decode_pre_op_attr(__be32 *p, struct nfs_fattr *fattr) |
246 | { | 246 | { |
247 | if (*p++) | 247 | if (*p++) |
248 | return xdr_decode_wcc_attr(p, fattr); | 248 | return xdr_decode_wcc_attr(p, fattr); |
@@ -250,8 +250,8 @@ xdr_decode_pre_op_attr(u32 *p, struct nfs_fattr *fattr) | |||
250 | } | 250 | } |
251 | 251 | ||
252 | 252 | ||
253 | static inline u32 * | 253 | static inline __be32 * |
254 | xdr_decode_wcc_data(u32 *p, struct nfs_fattr *fattr) | 254 | xdr_decode_wcc_data(__be32 *p, struct nfs_fattr *fattr) |
255 | { | 255 | { |
256 | p = xdr_decode_pre_op_attr(p, fattr); | 256 | p = xdr_decode_pre_op_attr(p, fattr); |
257 | return xdr_decode_post_op_attr(p, fattr); | 257 | return xdr_decode_post_op_attr(p, fattr); |
@@ -265,7 +265,7 @@ xdr_decode_wcc_data(u32 *p, struct nfs_fattr *fattr) | |||
265 | * Encode file handle argument | 265 | * Encode file handle argument |
266 | */ | 266 | */ |
267 | static int | 267 | static int |
268 | nfs3_xdr_fhandle(struct rpc_rqst *req, u32 *p, struct nfs_fh *fh) | 268 | nfs3_xdr_fhandle(struct rpc_rqst *req, __be32 *p, struct nfs_fh *fh) |
269 | { | 269 | { |
270 | p = xdr_encode_fhandle(p, fh); | 270 | p = xdr_encode_fhandle(p, fh); |
271 | req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); | 271 | req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); |
@@ -276,7 +276,7 @@ nfs3_xdr_fhandle(struct rpc_rqst *req, u32 *p, struct nfs_fh *fh) | |||
276 | * Encode SETATTR arguments | 276 | * Encode SETATTR arguments |
277 | */ | 277 | */ |
278 | static int | 278 | static int |
279 | nfs3_xdr_sattrargs(struct rpc_rqst *req, u32 *p, struct nfs3_sattrargs *args) | 279 | nfs3_xdr_sattrargs(struct rpc_rqst *req, __be32 *p, struct nfs3_sattrargs *args) |
280 | { | 280 | { |
281 | p = xdr_encode_fhandle(p, args->fh); | 281 | p = xdr_encode_fhandle(p, args->fh); |
282 | p = xdr_encode_sattr(p, args->sattr); | 282 | p = xdr_encode_sattr(p, args->sattr); |
@@ -291,7 +291,7 @@ nfs3_xdr_sattrargs(struct rpc_rqst *req, u32 *p, struct nfs3_sattrargs *args) | |||
291 | * Encode directory ops argument | 291 | * Encode directory ops argument |
292 | */ | 292 | */ |
293 | static int | 293 | static int |
294 | nfs3_xdr_diropargs(struct rpc_rqst *req, u32 *p, struct nfs3_diropargs *args) | 294 | nfs3_xdr_diropargs(struct rpc_rqst *req, __be32 *p, struct nfs3_diropargs *args) |
295 | { | 295 | { |
296 | p = xdr_encode_fhandle(p, args->fh); | 296 | p = xdr_encode_fhandle(p, args->fh); |
297 | p = xdr_encode_array(p, args->name, args->len); | 297 | p = xdr_encode_array(p, args->name, args->len); |
@@ -303,7 +303,7 @@ nfs3_xdr_diropargs(struct rpc_rqst *req, u32 *p, struct nfs3_diropargs *args) | |||
303 | * Encode access() argument | 303 | * Encode access() argument |
304 | */ | 304 | */ |
305 | static int | 305 | static int |
306 | nfs3_xdr_accessargs(struct rpc_rqst *req, u32 *p, struct nfs3_accessargs *args) | 306 | nfs3_xdr_accessargs(struct rpc_rqst *req, __be32 *p, struct nfs3_accessargs *args) |
307 | { | 307 | { |
308 | p = xdr_encode_fhandle(p, args->fh); | 308 | p = xdr_encode_fhandle(p, args->fh); |
309 | *p++ = htonl(args->access); | 309 | *p++ = htonl(args->access); |
@@ -317,7 +317,7 @@ nfs3_xdr_accessargs(struct rpc_rqst *req, u32 *p, struct nfs3_accessargs *args) | |||
317 | * exactly to the page we want to fetch. | 317 | * exactly to the page we want to fetch. |
318 | */ | 318 | */ |
319 | static int | 319 | static int |
320 | nfs3_xdr_readargs(struct rpc_rqst *req, u32 *p, struct nfs_readargs *args) | 320 | nfs3_xdr_readargs(struct rpc_rqst *req, __be32 *p, struct nfs_readargs *args) |
321 | { | 321 | { |
322 | struct rpc_auth *auth = req->rq_task->tk_auth; | 322 | struct rpc_auth *auth = req->rq_task->tk_auth; |
323 | unsigned int replen; | 323 | unsigned int replen; |
@@ -339,7 +339,7 @@ nfs3_xdr_readargs(struct rpc_rqst *req, u32 *p, struct nfs_readargs *args) | |||
339 | * Write arguments. Splice the buffer to be written into the iovec. | 339 | * Write arguments. Splice the buffer to be written into the iovec. |
340 | */ | 340 | */ |
341 | static int | 341 | static int |
342 | nfs3_xdr_writeargs(struct rpc_rqst *req, u32 *p, struct nfs_writeargs *args) | 342 | nfs3_xdr_writeargs(struct rpc_rqst *req, __be32 *p, struct nfs_writeargs *args) |
343 | { | 343 | { |
344 | struct xdr_buf *sndbuf = &req->rq_snd_buf; | 344 | struct xdr_buf *sndbuf = &req->rq_snd_buf; |
345 | u32 count = args->count; | 345 | u32 count = args->count; |
@@ -360,7 +360,7 @@ nfs3_xdr_writeargs(struct rpc_rqst *req, u32 *p, struct nfs_writeargs *args) | |||
360 | * Encode CREATE arguments | 360 | * Encode CREATE arguments |
361 | */ | 361 | */ |
362 | static int | 362 | static int |
363 | nfs3_xdr_createargs(struct rpc_rqst *req, u32 *p, struct nfs3_createargs *args) | 363 | nfs3_xdr_createargs(struct rpc_rqst *req, __be32 *p, struct nfs3_createargs *args) |
364 | { | 364 | { |
365 | p = xdr_encode_fhandle(p, args->fh); | 365 | p = xdr_encode_fhandle(p, args->fh); |
366 | p = xdr_encode_array(p, args->name, args->len); | 366 | p = xdr_encode_array(p, args->name, args->len); |
@@ -380,7 +380,7 @@ nfs3_xdr_createargs(struct rpc_rqst *req, u32 *p, struct nfs3_createargs *args) | |||
380 | * Encode MKDIR arguments | 380 | * Encode MKDIR arguments |
381 | */ | 381 | */ |
382 | static int | 382 | static int |
383 | nfs3_xdr_mkdirargs(struct rpc_rqst *req, u32 *p, struct nfs3_mkdirargs *args) | 383 | nfs3_xdr_mkdirargs(struct rpc_rqst *req, __be32 *p, struct nfs3_mkdirargs *args) |
384 | { | 384 | { |
385 | p = xdr_encode_fhandle(p, args->fh); | 385 | p = xdr_encode_fhandle(p, args->fh); |
386 | p = xdr_encode_array(p, args->name, args->len); | 386 | p = xdr_encode_array(p, args->name, args->len); |
@@ -393,7 +393,7 @@ nfs3_xdr_mkdirargs(struct rpc_rqst *req, u32 *p, struct nfs3_mkdirargs *args) | |||
393 | * Encode SYMLINK arguments | 393 | * Encode SYMLINK arguments |
394 | */ | 394 | */ |
395 | static int | 395 | static int |
396 | nfs3_xdr_symlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_symlinkargs *args) | 396 | nfs3_xdr_symlinkargs(struct rpc_rqst *req, __be32 *p, struct nfs3_symlinkargs *args) |
397 | { | 397 | { |
398 | p = xdr_encode_fhandle(p, args->fromfh); | 398 | p = xdr_encode_fhandle(p, args->fromfh); |
399 | p = xdr_encode_array(p, args->fromname, args->fromlen); | 399 | p = xdr_encode_array(p, args->fromname, args->fromlen); |
@@ -410,7 +410,7 @@ nfs3_xdr_symlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_symlinkargs *args | |||
410 | * Encode MKNOD arguments | 410 | * Encode MKNOD arguments |
411 | */ | 411 | */ |
412 | static int | 412 | static int |
413 | nfs3_xdr_mknodargs(struct rpc_rqst *req, u32 *p, struct nfs3_mknodargs *args) | 413 | nfs3_xdr_mknodargs(struct rpc_rqst *req, __be32 *p, struct nfs3_mknodargs *args) |
414 | { | 414 | { |
415 | p = xdr_encode_fhandle(p, args->fh); | 415 | p = xdr_encode_fhandle(p, args->fh); |
416 | p = xdr_encode_array(p, args->name, args->len); | 416 | p = xdr_encode_array(p, args->name, args->len); |
@@ -429,7 +429,7 @@ nfs3_xdr_mknodargs(struct rpc_rqst *req, u32 *p, struct nfs3_mknodargs *args) | |||
429 | * Encode RENAME arguments | 429 | * Encode RENAME arguments |
430 | */ | 430 | */ |
431 | static int | 431 | static int |
432 | nfs3_xdr_renameargs(struct rpc_rqst *req, u32 *p, struct nfs3_renameargs *args) | 432 | nfs3_xdr_renameargs(struct rpc_rqst *req, __be32 *p, struct nfs3_renameargs *args) |
433 | { | 433 | { |
434 | p = xdr_encode_fhandle(p, args->fromfh); | 434 | p = xdr_encode_fhandle(p, args->fromfh); |
435 | p = xdr_encode_array(p, args->fromname, args->fromlen); | 435 | p = xdr_encode_array(p, args->fromname, args->fromlen); |
@@ -443,7 +443,7 @@ nfs3_xdr_renameargs(struct rpc_rqst *req, u32 *p, struct nfs3_renameargs *args) | |||
443 | * Encode LINK arguments | 443 | * Encode LINK arguments |
444 | */ | 444 | */ |
445 | static int | 445 | static int |
446 | nfs3_xdr_linkargs(struct rpc_rqst *req, u32 *p, struct nfs3_linkargs *args) | 446 | nfs3_xdr_linkargs(struct rpc_rqst *req, __be32 *p, struct nfs3_linkargs *args) |
447 | { | 447 | { |
448 | p = xdr_encode_fhandle(p, args->fromfh); | 448 | p = xdr_encode_fhandle(p, args->fromfh); |
449 | p = xdr_encode_fhandle(p, args->tofh); | 449 | p = xdr_encode_fhandle(p, args->tofh); |
@@ -456,7 +456,7 @@ nfs3_xdr_linkargs(struct rpc_rqst *req, u32 *p, struct nfs3_linkargs *args) | |||
456 | * Encode arguments to readdir call | 456 | * Encode arguments to readdir call |
457 | */ | 457 | */ |
458 | static int | 458 | static int |
459 | nfs3_xdr_readdirargs(struct rpc_rqst *req, u32 *p, struct nfs3_readdirargs *args) | 459 | nfs3_xdr_readdirargs(struct rpc_rqst *req, __be32 *p, struct nfs3_readdirargs *args) |
460 | { | 460 | { |
461 | struct rpc_auth *auth = req->rq_task->tk_auth; | 461 | struct rpc_auth *auth = req->rq_task->tk_auth; |
462 | unsigned int replen; | 462 | unsigned int replen; |
@@ -485,7 +485,7 @@ nfs3_xdr_readdirargs(struct rpc_rqst *req, u32 *p, struct nfs3_readdirargs *args | |||
485 | * We just check for syntactical correctness. | 485 | * We just check for syntactical correctness. |
486 | */ | 486 | */ |
487 | static int | 487 | static int |
488 | nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res) | 488 | nfs3_xdr_readdirres(struct rpc_rqst *req, __be32 *p, struct nfs3_readdirres *res) |
489 | { | 489 | { |
490 | struct xdr_buf *rcvbuf = &req->rq_rcv_buf; | 490 | struct xdr_buf *rcvbuf = &req->rq_rcv_buf; |
491 | struct kvec *iov = rcvbuf->head; | 491 | struct kvec *iov = rcvbuf->head; |
@@ -493,7 +493,7 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res) | |||
493 | int hdrlen, recvd; | 493 | int hdrlen, recvd; |
494 | int status, nr; | 494 | int status, nr; |
495 | unsigned int len, pglen; | 495 | unsigned int len, pglen; |
496 | u32 *entry, *end, *kaddr; | 496 | __be32 *entry, *end, *kaddr; |
497 | 497 | ||
498 | status = ntohl(*p++); | 498 | status = ntohl(*p++); |
499 | /* Decode post_op_attrs */ | 499 | /* Decode post_op_attrs */ |
@@ -523,8 +523,8 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res) | |||
523 | if (pglen > recvd) | 523 | if (pglen > recvd) |
524 | pglen = recvd; | 524 | pglen = recvd; |
525 | page = rcvbuf->pages; | 525 | page = rcvbuf->pages; |
526 | kaddr = p = (u32 *)kmap_atomic(*page, KM_USER0); | 526 | kaddr = p = kmap_atomic(*page, KM_USER0); |
527 | end = (u32 *)((char *)p + pglen); | 527 | end = (__be32 *)((char *)p + pglen); |
528 | entry = p; | 528 | entry = p; |
529 | for (nr = 0; *p++; nr++) { | 529 | for (nr = 0; *p++; nr++) { |
530 | if (p + 3 > end) | 530 | if (p + 3 > end) |
@@ -626,7 +626,7 @@ nfs3_decode_dirent(u32 *p, struct nfs_entry *entry, int plus) | |||
626 | * Encode COMMIT arguments | 626 | * Encode COMMIT arguments |
627 | */ | 627 | */ |
628 | static int | 628 | static int |
629 | nfs3_xdr_commitargs(struct rpc_rqst *req, u32 *p, struct nfs_writeargs *args) | 629 | nfs3_xdr_commitargs(struct rpc_rqst *req, __be32 *p, struct nfs_writeargs *args) |
630 | { | 630 | { |
631 | p = xdr_encode_fhandle(p, args->fh); | 631 | p = xdr_encode_fhandle(p, args->fh); |
632 | p = xdr_encode_hyper(p, args->offset); | 632 | p = xdr_encode_hyper(p, args->offset); |
@@ -640,7 +640,7 @@ nfs3_xdr_commitargs(struct rpc_rqst *req, u32 *p, struct nfs_writeargs *args) | |||
640 | * Encode GETACL arguments | 640 | * Encode GETACL arguments |
641 | */ | 641 | */ |
642 | static int | 642 | static int |
643 | nfs3_xdr_getaclargs(struct rpc_rqst *req, u32 *p, | 643 | nfs3_xdr_getaclargs(struct rpc_rqst *req, __be32 *p, |
644 | struct nfs3_getaclargs *args) | 644 | struct nfs3_getaclargs *args) |
645 | { | 645 | { |
646 | struct rpc_auth *auth = req->rq_task->tk_auth; | 646 | struct rpc_auth *auth = req->rq_task->tk_auth; |
@@ -664,7 +664,7 @@ nfs3_xdr_getaclargs(struct rpc_rqst *req, u32 *p, | |||
664 | * Encode SETACL arguments | 664 | * Encode SETACL arguments |
665 | */ | 665 | */ |
666 | static int | 666 | static int |
667 | nfs3_xdr_setaclargs(struct rpc_rqst *req, u32 *p, | 667 | nfs3_xdr_setaclargs(struct rpc_rqst *req, __be32 *p, |
668 | struct nfs3_setaclargs *args) | 668 | struct nfs3_setaclargs *args) |
669 | { | 669 | { |
670 | struct xdr_buf *buf = &req->rq_snd_buf; | 670 | struct xdr_buf *buf = &req->rq_snd_buf; |
@@ -711,7 +711,7 @@ nfs3_xdr_setaclargs(struct rpc_rqst *req, u32 *p, | |||
711 | * Decode attrstat reply. | 711 | * Decode attrstat reply. |
712 | */ | 712 | */ |
713 | static int | 713 | static int |
714 | nfs3_xdr_attrstat(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) | 714 | nfs3_xdr_attrstat(struct rpc_rqst *req, __be32 *p, struct nfs_fattr *fattr) |
715 | { | 715 | { |
716 | int status; | 716 | int status; |
717 | 717 | ||
@@ -726,7 +726,7 @@ nfs3_xdr_attrstat(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) | |||
726 | * SATTR, REMOVE, RMDIR | 726 | * SATTR, REMOVE, RMDIR |
727 | */ | 727 | */ |
728 | static int | 728 | static int |
729 | nfs3_xdr_wccstat(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) | 729 | nfs3_xdr_wccstat(struct rpc_rqst *req, __be32 *p, struct nfs_fattr *fattr) |
730 | { | 730 | { |
731 | int status; | 731 | int status; |
732 | 732 | ||
@@ -740,7 +740,7 @@ nfs3_xdr_wccstat(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) | |||
740 | * Decode LOOKUP reply | 740 | * Decode LOOKUP reply |
741 | */ | 741 | */ |
742 | static int | 742 | static int |
743 | nfs3_xdr_lookupres(struct rpc_rqst *req, u32 *p, struct nfs3_diropres *res) | 743 | nfs3_xdr_lookupres(struct rpc_rqst *req, __be32 *p, struct nfs3_diropres *res) |
744 | { | 744 | { |
745 | int status; | 745 | int status; |
746 | 746 | ||
@@ -759,7 +759,7 @@ nfs3_xdr_lookupres(struct rpc_rqst *req, u32 *p, struct nfs3_diropres *res) | |||
759 | * Decode ACCESS reply | 759 | * Decode ACCESS reply |
760 | */ | 760 | */ |
761 | static int | 761 | static int |
762 | nfs3_xdr_accessres(struct rpc_rqst *req, u32 *p, struct nfs3_accessres *res) | 762 | nfs3_xdr_accessres(struct rpc_rqst *req, __be32 *p, struct nfs3_accessres *res) |
763 | { | 763 | { |
764 | int status = ntohl(*p++); | 764 | int status = ntohl(*p++); |
765 | 765 | ||
@@ -771,7 +771,7 @@ nfs3_xdr_accessres(struct rpc_rqst *req, u32 *p, struct nfs3_accessres *res) | |||
771 | } | 771 | } |
772 | 772 | ||
773 | static int | 773 | static int |
774 | nfs3_xdr_readlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_readlinkargs *args) | 774 | nfs3_xdr_readlinkargs(struct rpc_rqst *req, __be32 *p, struct nfs3_readlinkargs *args) |
775 | { | 775 | { |
776 | struct rpc_auth *auth = req->rq_task->tk_auth; | 776 | struct rpc_auth *auth = req->rq_task->tk_auth; |
777 | unsigned int replen; | 777 | unsigned int replen; |
@@ -789,7 +789,7 @@ nfs3_xdr_readlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_readlinkargs *ar | |||
789 | * Decode READLINK reply | 789 | * Decode READLINK reply |
790 | */ | 790 | */ |
791 | static int | 791 | static int |
792 | nfs3_xdr_readlinkres(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) | 792 | nfs3_xdr_readlinkres(struct rpc_rqst *req, __be32 *p, struct nfs_fattr *fattr) |
793 | { | 793 | { |
794 | struct xdr_buf *rcvbuf = &req->rq_rcv_buf; | 794 | struct xdr_buf *rcvbuf = &req->rq_rcv_buf; |
795 | struct kvec *iov = rcvbuf->head; | 795 | struct kvec *iov = rcvbuf->head; |
@@ -837,7 +837,7 @@ nfs3_xdr_readlinkres(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) | |||
837 | * Decode READ reply | 837 | * Decode READ reply |
838 | */ | 838 | */ |
839 | static int | 839 | static int |
840 | nfs3_xdr_readres(struct rpc_rqst *req, u32 *p, struct nfs_readres *res) | 840 | nfs3_xdr_readres(struct rpc_rqst *req, __be32 *p, struct nfs_readres *res) |
841 | { | 841 | { |
842 | struct kvec *iov = req->rq_rcv_buf.head; | 842 | struct kvec *iov = req->rq_rcv_buf.head; |
843 | int status, count, ocount, recvd, hdrlen; | 843 | int status, count, ocount, recvd, hdrlen; |
@@ -888,7 +888,7 @@ nfs3_xdr_readres(struct rpc_rqst *req, u32 *p, struct nfs_readres *res) | |||
888 | * Decode WRITE response | 888 | * Decode WRITE response |
889 | */ | 889 | */ |
890 | static int | 890 | static int |
891 | nfs3_xdr_writeres(struct rpc_rqst *req, u32 *p, struct nfs_writeres *res) | 891 | nfs3_xdr_writeres(struct rpc_rqst *req, __be32 *p, struct nfs_writeres *res) |
892 | { | 892 | { |
893 | int status; | 893 | int status; |
894 | 894 | ||
@@ -910,7 +910,7 @@ nfs3_xdr_writeres(struct rpc_rqst *req, u32 *p, struct nfs_writeres *res) | |||
910 | * Decode a CREATE response | 910 | * Decode a CREATE response |
911 | */ | 911 | */ |
912 | static int | 912 | static int |
913 | nfs3_xdr_createres(struct rpc_rqst *req, u32 *p, struct nfs3_diropres *res) | 913 | nfs3_xdr_createres(struct rpc_rqst *req, __be32 *p, struct nfs3_diropres *res) |
914 | { | 914 | { |
915 | int status; | 915 | int status; |
916 | 916 | ||
@@ -937,7 +937,7 @@ nfs3_xdr_createres(struct rpc_rqst *req, u32 *p, struct nfs3_diropres *res) | |||
937 | * Decode RENAME reply | 937 | * Decode RENAME reply |
938 | */ | 938 | */ |
939 | static int | 939 | static int |
940 | nfs3_xdr_renameres(struct rpc_rqst *req, u32 *p, struct nfs3_renameres *res) | 940 | nfs3_xdr_renameres(struct rpc_rqst *req, __be32 *p, struct nfs3_renameres *res) |
941 | { | 941 | { |
942 | int status; | 942 | int status; |
943 | 943 | ||
@@ -952,7 +952,7 @@ nfs3_xdr_renameres(struct rpc_rqst *req, u32 *p, struct nfs3_renameres *res) | |||
952 | * Decode LINK reply | 952 | * Decode LINK reply |
953 | */ | 953 | */ |
954 | static int | 954 | static int |
955 | nfs3_xdr_linkres(struct rpc_rqst *req, u32 *p, struct nfs3_linkres *res) | 955 | nfs3_xdr_linkres(struct rpc_rqst *req, __be32 *p, struct nfs3_linkres *res) |
956 | { | 956 | { |
957 | int status; | 957 | int status; |
958 | 958 | ||
@@ -967,7 +967,7 @@ nfs3_xdr_linkres(struct rpc_rqst *req, u32 *p, struct nfs3_linkres *res) | |||
967 | * Decode FSSTAT reply | 967 | * Decode FSSTAT reply |
968 | */ | 968 | */ |
969 | static int | 969 | static int |
970 | nfs3_xdr_fsstatres(struct rpc_rqst *req, u32 *p, struct nfs_fsstat *res) | 970 | nfs3_xdr_fsstatres(struct rpc_rqst *req, __be32 *p, struct nfs_fsstat *res) |
971 | { | 971 | { |
972 | int status; | 972 | int status; |
973 | 973 | ||
@@ -992,7 +992,7 @@ nfs3_xdr_fsstatres(struct rpc_rqst *req, u32 *p, struct nfs_fsstat *res) | |||
992 | * Decode FSINFO reply | 992 | * Decode FSINFO reply |
993 | */ | 993 | */ |
994 | static int | 994 | static int |
995 | nfs3_xdr_fsinfores(struct rpc_rqst *req, u32 *p, struct nfs_fsinfo *res) | 995 | nfs3_xdr_fsinfores(struct rpc_rqst *req, __be32 *p, struct nfs_fsinfo *res) |
996 | { | 996 | { |
997 | int status; | 997 | int status; |
998 | 998 | ||
@@ -1020,7 +1020,7 @@ nfs3_xdr_fsinfores(struct rpc_rqst *req, u32 *p, struct nfs_fsinfo *res) | |||
1020 | * Decode PATHCONF reply | 1020 | * Decode PATHCONF reply |
1021 | */ | 1021 | */ |
1022 | static int | 1022 | static int |
1023 | nfs3_xdr_pathconfres(struct rpc_rqst *req, u32 *p, struct nfs_pathconf *res) | 1023 | nfs3_xdr_pathconfres(struct rpc_rqst *req, __be32 *p, struct nfs_pathconf *res) |
1024 | { | 1024 | { |
1025 | int status; | 1025 | int status; |
1026 | 1026 | ||
@@ -1040,7 +1040,7 @@ nfs3_xdr_pathconfres(struct rpc_rqst *req, u32 *p, struct nfs_pathconf *res) | |||
1040 | * Decode COMMIT reply | 1040 | * Decode COMMIT reply |
1041 | */ | 1041 | */ |
1042 | static int | 1042 | static int |
1043 | nfs3_xdr_commitres(struct rpc_rqst *req, u32 *p, struct nfs_writeres *res) | 1043 | nfs3_xdr_commitres(struct rpc_rqst *req, __be32 *p, struct nfs_writeres *res) |
1044 | { | 1044 | { |
1045 | int status; | 1045 | int status; |
1046 | 1046 | ||
@@ -1059,7 +1059,7 @@ nfs3_xdr_commitres(struct rpc_rqst *req, u32 *p, struct nfs_writeres *res) | |||
1059 | * Decode GETACL reply | 1059 | * Decode GETACL reply |
1060 | */ | 1060 | */ |
1061 | static int | 1061 | static int |
1062 | nfs3_xdr_getaclres(struct rpc_rqst *req, u32 *p, | 1062 | nfs3_xdr_getaclres(struct rpc_rqst *req, __be32 *p, |
1063 | struct nfs3_getaclres *res) | 1063 | struct nfs3_getaclres *res) |
1064 | { | 1064 | { |
1065 | struct xdr_buf *buf = &req->rq_rcv_buf; | 1065 | struct xdr_buf *buf = &req->rq_rcv_buf; |
@@ -1091,7 +1091,7 @@ nfs3_xdr_getaclres(struct rpc_rqst *req, u32 *p, | |||
1091 | * Decode setacl reply. | 1091 | * Decode setacl reply. |
1092 | */ | 1092 | */ |
1093 | static int | 1093 | static int |
1094 | nfs3_xdr_setaclres(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) | 1094 | nfs3_xdr_setaclres(struct rpc_rqst *req, __be32 *p, struct nfs_fattr *fattr) |
1095 | { | 1095 | { |
1096 | int status = ntohl(*p++); | 1096 | int status = ntohl(*p++); |
1097 | 1097 | ||