aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-10-20 02:28:56 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-20 13:26:41 -0400
commit131a21c2177c267ab259fcd06947c6f593a7de8e (patch)
tree7841d3c58e3dfc103fefb895e43bac0f5afbd751
parentad451d389f46f699832da3e9ad95f610cb8c0fd2 (diff)
[PATCH] xdr annotations: NFSv2 server
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/nfsd/nfs2acl.c18
-rw-r--r--fs/nfsd/nfsxdr.c72
-rw-r--r--include/linux/nfsd/nfsd.h2
-rw-r--r--include/linux/nfsd/xdr.h50
4 files changed, 71 insertions, 71 deletions
diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c
index 8d48616882c1..fd5397d8c62a 100644
--- a/fs/nfsd/nfs2acl.c
+++ b/fs/nfsd/nfs2acl.c
@@ -158,7 +158,7 @@ static __be32 nfsacld_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessarg
158/* 158/*
159 * XDR decode functions 159 * XDR decode functions
160 */ 160 */
161static int nfsaclsvc_decode_getaclargs(struct svc_rqst *rqstp, u32 *p, 161static int nfsaclsvc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
162 struct nfsd3_getaclargs *argp) 162 struct nfsd3_getaclargs *argp)
163{ 163{
164 if (!(p = nfs2svc_decode_fh(p, &argp->fh))) 164 if (!(p = nfs2svc_decode_fh(p, &argp->fh)))
@@ -169,7 +169,7 @@ static int nfsaclsvc_decode_getaclargs(struct svc_rqst *rqstp, u32 *p,
169} 169}
170 170
171 171
172static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, u32 *p, 172static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
173 struct nfsd3_setaclargs *argp) 173 struct nfsd3_setaclargs *argp)
174{ 174{
175 struct kvec *head = rqstp->rq_arg.head; 175 struct kvec *head = rqstp->rq_arg.head;
@@ -194,7 +194,7 @@ static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, u32 *p,
194 return (n > 0); 194 return (n > 0);
195} 195}
196 196
197static int nfsaclsvc_decode_fhandleargs(struct svc_rqst *rqstp, u32 *p, 197static int nfsaclsvc_decode_fhandleargs(struct svc_rqst *rqstp, __be32 *p,
198 struct nfsd_fhandle *argp) 198 struct nfsd_fhandle *argp)
199{ 199{
200 if (!(p = nfs2svc_decode_fh(p, &argp->fh))) 200 if (!(p = nfs2svc_decode_fh(p, &argp->fh)))
@@ -202,7 +202,7 @@ static int nfsaclsvc_decode_fhandleargs(struct svc_rqst *rqstp, u32 *p,
202 return xdr_argsize_check(rqstp, p); 202 return xdr_argsize_check(rqstp, p);
203} 203}
204 204
205static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, u32 *p, 205static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p,
206 struct nfsd3_accessargs *argp) 206 struct nfsd3_accessargs *argp)
207{ 207{
208 if (!(p = nfs2svc_decode_fh(p, &argp->fh))) 208 if (!(p = nfs2svc_decode_fh(p, &argp->fh)))
@@ -217,7 +217,7 @@ static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, u32 *p,
217 */ 217 */
218 218
219/* GETACL */ 219/* GETACL */
220static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, u32 *p, 220static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
221 struct nfsd3_getaclres *resp) 221 struct nfsd3_getaclres *resp)
222{ 222{
223 struct dentry *dentry = resp->fh.fh_dentry; 223 struct dentry *dentry = resp->fh.fh_dentry;
@@ -259,7 +259,7 @@ static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, u32 *p,
259 return 1; 259 return 1;
260} 260}
261 261
262static int nfsaclsvc_encode_attrstatres(struct svc_rqst *rqstp, u32 *p, 262static int nfsaclsvc_encode_attrstatres(struct svc_rqst *rqstp, __be32 *p,
263 struct nfsd_attrstat *resp) 263 struct nfsd_attrstat *resp)
264{ 264{
265 p = nfs2svc_encode_fattr(rqstp, p, &resp->fh); 265 p = nfs2svc_encode_fattr(rqstp, p, &resp->fh);
@@ -267,7 +267,7 @@ static int nfsaclsvc_encode_attrstatres(struct svc_rqst *rqstp, u32 *p,
267} 267}
268 268
269/* ACCESS */ 269/* ACCESS */
270static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, u32 *p, 270static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, __be32 *p,
271 struct nfsd3_accessres *resp) 271 struct nfsd3_accessres *resp)
272{ 272{
273 p = nfs2svc_encode_fattr(rqstp, p, &resp->fh); 273 p = nfs2svc_encode_fattr(rqstp, p, &resp->fh);
@@ -278,7 +278,7 @@ static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, u32 *p,
278/* 278/*
279 * XDR release functions 279 * XDR release functions
280 */ 280 */
281static int nfsaclsvc_release_getacl(struct svc_rqst *rqstp, u32 *p, 281static int nfsaclsvc_release_getacl(struct svc_rqst *rqstp, __be32 *p,
282 struct nfsd3_getaclres *resp) 282 struct nfsd3_getaclres *resp)
283{ 283{
284 fh_put(&resp->fh); 284 fh_put(&resp->fh);
@@ -287,7 +287,7 @@ static int nfsaclsvc_release_getacl(struct svc_rqst *rqstp, u32 *p,
287 return 1; 287 return 1;
288} 288}
289 289
290static int nfsaclsvc_release_fhandle(struct svc_rqst *rqstp, u32 *p, 290static int nfsaclsvc_release_fhandle(struct svc_rqst *rqstp, __be32 *p,
291 struct nfsd_fhandle *resp) 291 struct nfsd_fhandle *resp)
292{ 292{
293 fh_put(&resp->fh); 293 fh_put(&resp->fh);
diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
index 1135c0d14557..56ebb1443e0e 100644
--- a/fs/nfsd/nfsxdr.c
+++ b/fs/nfsd/nfsxdr.c
@@ -37,8 +37,8 @@ static u32 nfs_ftypes[] = {
37/* 37/*
38 * XDR functions for basic NFS types 38 * XDR functions for basic NFS types
39 */ 39 */
40static u32 * 40static __be32 *
41decode_fh(u32 *p, struct svc_fh *fhp) 41decode_fh(__be32 *p, struct svc_fh *fhp)
42{ 42{
43 fh_init(fhp, NFS_FHSIZE); 43 fh_init(fhp, NFS_FHSIZE);
44 memcpy(&fhp->fh_handle.fh_base, p, NFS_FHSIZE); 44 memcpy(&fhp->fh_handle.fh_base, p, NFS_FHSIZE);
@@ -50,13 +50,13 @@ decode_fh(u32 *p, struct svc_fh *fhp)
50} 50}
51 51
52/* Helper function for NFSv2 ACL code */ 52/* Helper function for NFSv2 ACL code */
53u32 *nfs2svc_decode_fh(u32 *p, struct svc_fh *fhp) 53__be32 *nfs2svc_decode_fh(__be32 *p, struct svc_fh *fhp)
54{ 54{
55 return decode_fh(p, fhp); 55 return decode_fh(p, fhp);
56} 56}
57 57
58static inline u32 * 58static inline __be32 *
59encode_fh(u32 *p, struct svc_fh *fhp) 59encode_fh(__be32 *p, struct svc_fh *fhp)
60{ 60{
61 memcpy(p, &fhp->fh_handle.fh_base, NFS_FHSIZE); 61 memcpy(p, &fhp->fh_handle.fh_base, NFS_FHSIZE);
62 return p + (NFS_FHSIZE>> 2); 62 return p + (NFS_FHSIZE>> 2);
@@ -66,8 +66,8 @@ encode_fh(u32 *p, struct svc_fh *fhp)
66 * Decode a file name and make sure that the path contains 66 * Decode a file name and make sure that the path contains
67 * no slashes or null bytes. 67 * no slashes or null bytes.
68 */ 68 */
69static inline u32 * 69static inline __be32 *
70decode_filename(u32 *p, char **namp, int *lenp) 70decode_filename(__be32 *p, char **namp, int *lenp)
71{ 71{
72 char *name; 72 char *name;
73 int i; 73 int i;
@@ -82,8 +82,8 @@ decode_filename(u32 *p, char **namp, int *lenp)
82 return p; 82 return p;
83} 83}
84 84
85static inline u32 * 85static inline __be32 *
86decode_pathname(u32 *p, char **namp, int *lenp) 86decode_pathname(__be32 *p, char **namp, int *lenp)
87{ 87{
88 char *name; 88 char *name;
89 int i; 89 int i;
@@ -98,8 +98,8 @@ decode_pathname(u32 *p, char **namp, int *lenp)
98 return p; 98 return p;
99} 99}
100 100
101static inline u32 * 101static inline __be32 *
102decode_sattr(u32 *p, struct iattr *iap) 102decode_sattr(__be32 *p, struct iattr *iap)
103{ 103{
104 u32 tmp, tmp1; 104 u32 tmp, tmp1;
105 105
@@ -151,8 +151,8 @@ decode_sattr(u32 *p, struct iattr *iap)
151 return p; 151 return p;
152} 152}
153 153
154static u32 * 154static __be32 *
155encode_fattr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp, 155encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp,
156 struct kstat *stat) 156 struct kstat *stat)
157{ 157{
158 struct dentry *dentry = fhp->fh_dentry; 158 struct dentry *dentry = fhp->fh_dentry;
@@ -195,7 +195,7 @@ encode_fattr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp,
195} 195}
196 196
197/* Helper function for NFSv2 ACL code */ 197/* Helper function for NFSv2 ACL code */
198u32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp) 198__be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp)
199{ 199{
200 struct kstat stat; 200 struct kstat stat;
201 vfs_getattr(fhp->fh_export->ex_mnt, fhp->fh_dentry, &stat); 201 vfs_getattr(fhp->fh_export->ex_mnt, fhp->fh_dentry, &stat);
@@ -206,13 +206,13 @@ u32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp)
206 * XDR decode functions 206 * XDR decode functions
207 */ 207 */
208int 208int
209nfssvc_decode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) 209nfssvc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
210{ 210{
211 return xdr_argsize_check(rqstp, p); 211 return xdr_argsize_check(rqstp, p);
212} 212}
213 213
214int 214int
215nfssvc_decode_fhandle(struct svc_rqst *rqstp, u32 *p, struct nfsd_fhandle *args) 215nfssvc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p, struct nfsd_fhandle *args)
216{ 216{
217 if (!(p = decode_fh(p, &args->fh))) 217 if (!(p = decode_fh(p, &args->fh)))
218 return 0; 218 return 0;
@@ -220,7 +220,7 @@ nfssvc_decode_fhandle(struct svc_rqst *rqstp, u32 *p, struct nfsd_fhandle *args)
220} 220}
221 221
222int 222int
223nfssvc_decode_sattrargs(struct svc_rqst *rqstp, u32 *p, 223nfssvc_decode_sattrargs(struct svc_rqst *rqstp, __be32 *p,
224 struct nfsd_sattrargs *args) 224 struct nfsd_sattrargs *args)
225{ 225{
226 if (!(p = decode_fh(p, &args->fh)) 226 if (!(p = decode_fh(p, &args->fh))
@@ -231,7 +231,7 @@ nfssvc_decode_sattrargs(struct svc_rqst *rqstp, u32 *p,
231} 231}
232 232
233int 233int
234nfssvc_decode_diropargs(struct svc_rqst *rqstp, u32 *p, 234nfssvc_decode_diropargs(struct svc_rqst *rqstp, __be32 *p,
235 struct nfsd_diropargs *args) 235 struct nfsd_diropargs *args)
236{ 236{
237 if (!(p = decode_fh(p, &args->fh)) 237 if (!(p = decode_fh(p, &args->fh))
@@ -242,7 +242,7 @@ nfssvc_decode_diropargs(struct svc_rqst *rqstp, u32 *p,
242} 242}
243 243
244int 244int
245nfssvc_decode_readargs(struct svc_rqst *rqstp, u32 *p, 245nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
246 struct nfsd_readargs *args) 246 struct nfsd_readargs *args)
247{ 247{
248 unsigned int len; 248 unsigned int len;
@@ -273,7 +273,7 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, u32 *p,
273} 273}
274 274
275int 275int
276nfssvc_decode_writeargs(struct svc_rqst *rqstp, u32 *p, 276nfssvc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
277 struct nfsd_writeargs *args) 277 struct nfsd_writeargs *args)
278{ 278{
279 unsigned int len; 279 unsigned int len;
@@ -303,7 +303,7 @@ nfssvc_decode_writeargs(struct svc_rqst *rqstp, u32 *p,
303} 303}
304 304
305int 305int
306nfssvc_decode_createargs(struct svc_rqst *rqstp, u32 *p, 306nfssvc_decode_createargs(struct svc_rqst *rqstp, __be32 *p,
307 struct nfsd_createargs *args) 307 struct nfsd_createargs *args)
308{ 308{
309 if (!(p = decode_fh(p, &args->fh)) 309 if (!(p = decode_fh(p, &args->fh))
@@ -315,7 +315,7 @@ nfssvc_decode_createargs(struct svc_rqst *rqstp, u32 *p,
315} 315}
316 316
317int 317int
318nfssvc_decode_renameargs(struct svc_rqst *rqstp, u32 *p, 318nfssvc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p,
319 struct nfsd_renameargs *args) 319 struct nfsd_renameargs *args)
320{ 320{
321 if (!(p = decode_fh(p, &args->ffh)) 321 if (!(p = decode_fh(p, &args->ffh))
@@ -328,7 +328,7 @@ nfssvc_decode_renameargs(struct svc_rqst *rqstp, u32 *p,
328} 328}
329 329
330int 330int
331nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, u32 *p, struct nfsd_readlinkargs *args) 331nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd_readlinkargs *args)
332{ 332{
333 if (!(p = decode_fh(p, &args->fh))) 333 if (!(p = decode_fh(p, &args->fh)))
334 return 0; 334 return 0;
@@ -338,7 +338,7 @@ nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, u32 *p, struct nfsd_readlinka
338} 338}
339 339
340int 340int
341nfssvc_decode_linkargs(struct svc_rqst *rqstp, u32 *p, 341nfssvc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p,
342 struct nfsd_linkargs *args) 342 struct nfsd_linkargs *args)
343{ 343{
344 if (!(p = decode_fh(p, &args->ffh)) 344 if (!(p = decode_fh(p, &args->ffh))
@@ -350,7 +350,7 @@ nfssvc_decode_linkargs(struct svc_rqst *rqstp, u32 *p,
350} 350}
351 351
352int 352int
353nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p, 353nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
354 struct nfsd_symlinkargs *args) 354 struct nfsd_symlinkargs *args)
355{ 355{
356 if (!(p = decode_fh(p, &args->ffh)) 356 if (!(p = decode_fh(p, &args->ffh))
@@ -363,7 +363,7 @@ nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p,
363} 363}
364 364
365int 365int
366nfssvc_decode_readdirargs(struct svc_rqst *rqstp, u32 *p, 366nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
367 struct nfsd_readdirargs *args) 367 struct nfsd_readdirargs *args)
368{ 368{
369 if (!(p = decode_fh(p, &args->fh))) 369 if (!(p = decode_fh(p, &args->fh)))
@@ -382,13 +382,13 @@ nfssvc_decode_readdirargs(struct svc_rqst *rqstp, u32 *p,
382 * XDR encode functions 382 * XDR encode functions
383 */ 383 */
384int 384int
385nfssvc_encode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) 385nfssvc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
386{ 386{
387 return xdr_ressize_check(rqstp, p); 387 return xdr_ressize_check(rqstp, p);
388} 388}
389 389
390int 390int
391nfssvc_encode_attrstat(struct svc_rqst *rqstp, u32 *p, 391nfssvc_encode_attrstat(struct svc_rqst *rqstp, __be32 *p,
392 struct nfsd_attrstat *resp) 392 struct nfsd_attrstat *resp)
393{ 393{
394 p = encode_fattr(rqstp, p, &resp->fh, &resp->stat); 394 p = encode_fattr(rqstp, p, &resp->fh, &resp->stat);
@@ -396,7 +396,7 @@ nfssvc_encode_attrstat(struct svc_rqst *rqstp, u32 *p,
396} 396}
397 397
398int 398int
399nfssvc_encode_diropres(struct svc_rqst *rqstp, u32 *p, 399nfssvc_encode_diropres(struct svc_rqst *rqstp, __be32 *p,
400 struct nfsd_diropres *resp) 400 struct nfsd_diropres *resp)
401{ 401{
402 p = encode_fh(p, &resp->fh); 402 p = encode_fh(p, &resp->fh);
@@ -405,7 +405,7 @@ nfssvc_encode_diropres(struct svc_rqst *rqstp, u32 *p,
405} 405}
406 406
407int 407int
408nfssvc_encode_readlinkres(struct svc_rqst *rqstp, u32 *p, 408nfssvc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p,
409 struct nfsd_readlinkres *resp) 409 struct nfsd_readlinkres *resp)
410{ 410{
411 *p++ = htonl(resp->len); 411 *p++ = htonl(resp->len);
@@ -421,7 +421,7 @@ nfssvc_encode_readlinkres(struct svc_rqst *rqstp, u32 *p,
421} 421}
422 422
423int 423int
424nfssvc_encode_readres(struct svc_rqst *rqstp, u32 *p, 424nfssvc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
425 struct nfsd_readres *resp) 425 struct nfsd_readres *resp)
426{ 426{
427 p = encode_fattr(rqstp, p, &resp->fh, &resp->stat); 427 p = encode_fattr(rqstp, p, &resp->fh, &resp->stat);
@@ -440,7 +440,7 @@ nfssvc_encode_readres(struct svc_rqst *rqstp, u32 *p,
440} 440}
441 441
442int 442int
443nfssvc_encode_readdirres(struct svc_rqst *rqstp, u32 *p, 443nfssvc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p,
444 struct nfsd_readdirres *resp) 444 struct nfsd_readdirres *resp)
445{ 445{
446 xdr_ressize_check(rqstp, p); 446 xdr_ressize_check(rqstp, p);
@@ -453,7 +453,7 @@ nfssvc_encode_readdirres(struct svc_rqst *rqstp, u32 *p,
453} 453}
454 454
455int 455int
456nfssvc_encode_statfsres(struct svc_rqst *rqstp, u32 *p, 456nfssvc_encode_statfsres(struct svc_rqst *rqstp, __be32 *p,
457 struct nfsd_statfsres *resp) 457 struct nfsd_statfsres *resp)
458{ 458{
459 struct kstatfs *stat = &resp->stats; 459 struct kstatfs *stat = &resp->stats;
@@ -471,7 +471,7 @@ nfssvc_encode_entry(struct readdir_cd *ccd, const char *name,
471 int namlen, loff_t offset, ino_t ino, unsigned int d_type) 471 int namlen, loff_t offset, ino_t ino, unsigned int d_type)
472{ 472{
473 struct nfsd_readdirres *cd = container_of(ccd, struct nfsd_readdirres, common); 473 struct nfsd_readdirres *cd = container_of(ccd, struct nfsd_readdirres, common);
474 u32 *p = cd->buffer; 474 __be32 *p = cd->buffer;
475 int buflen, slen; 475 int buflen, slen;
476 476
477 /* 477 /*
@@ -497,7 +497,7 @@ nfssvc_encode_entry(struct readdir_cd *ccd, const char *name,
497 *p++ = htonl((u32) ino); /* file id */ 497 *p++ = htonl((u32) ino); /* file id */
498 p = xdr_encode_array(p, name, namlen);/* name length & name */ 498 p = xdr_encode_array(p, name, namlen);/* name length & name */
499 cd->offset = p; /* remember pointer */ 499 cd->offset = p; /* remember pointer */
500 *p++ = ~(u32) 0; /* offset of next entry */ 500 *p++ = htonl(~0U); /* offset of next entry */
501 501
502 cd->buflen = buflen; 502 cd->buflen = buflen;
503 cd->buffer = p; 503 cd->buffer = p;
@@ -509,7 +509,7 @@ nfssvc_encode_entry(struct readdir_cd *ccd, const char *name,
509 * XDR release functions 509 * XDR release functions
510 */ 510 */
511int 511int
512nfssvc_release_fhandle(struct svc_rqst *rqstp, u32 *p, 512nfssvc_release_fhandle(struct svc_rqst *rqstp, __be32 *p,
513 struct nfsd_fhandle *resp) 513 struct nfsd_fhandle *resp)
514{ 514{
515 fh_put(&resp->fh); 515 fh_put(&resp->fh);
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index d0d4aae7085f..2f75160a5824 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -50,7 +50,7 @@
50 * Callback function for readdir 50 * Callback function for readdir
51 */ 51 */
52struct readdir_cd { 52struct readdir_cd {
53 int err; /* 0, nfserr, or nfserr_eof */ 53 __be32 err; /* 0, nfserr, or nfserr_eof */
54}; 54};
55typedef int (*encode_dent_fn)(struct readdir_cd *, const char *, 55typedef int (*encode_dent_fn)(struct readdir_cd *, const char *,
56 int, loff_t, ino_t, unsigned int); 56 int, loff_t, ino_t, unsigned int);
diff --git a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h
index 0e53de87d886..877192d3ae79 100644
--- a/include/linux/nfsd/xdr.h
+++ b/include/linux/nfsd/xdr.h
@@ -81,7 +81,7 @@ struct nfsd_readdirargs {
81 struct svc_fh fh; 81 struct svc_fh fh;
82 __u32 cookie; 82 __u32 cookie;
83 __u32 count; 83 __u32 count;
84 u32 * buffer; 84 __be32 * buffer;
85}; 85};
86 86
87struct nfsd_attrstat { 87struct nfsd_attrstat {
@@ -108,9 +108,9 @@ struct nfsd_readdirres {
108 int count; 108 int count;
109 109
110 struct readdir_cd common; 110 struct readdir_cd common;
111 u32 * buffer; 111 __be32 * buffer;
112 int buflen; 112 int buflen;
113 u32 * offset; 113 __be32 * offset;
114}; 114};
115 115
116struct nfsd_statfsres { 116struct nfsd_statfsres {
@@ -135,43 +135,43 @@ union nfsd_xdrstore {
135#define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore) 135#define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore)
136 136
137 137
138int nfssvc_decode_void(struct svc_rqst *, u32 *, void *); 138int nfssvc_decode_void(struct svc_rqst *, __be32 *, void *);
139int nfssvc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); 139int nfssvc_decode_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
140int nfssvc_decode_sattrargs(struct svc_rqst *, u32 *, 140int nfssvc_decode_sattrargs(struct svc_rqst *, __be32 *,
141 struct nfsd_sattrargs *); 141 struct nfsd_sattrargs *);
142int nfssvc_decode_diropargs(struct svc_rqst *, u32 *, 142int nfssvc_decode_diropargs(struct svc_rqst *, __be32 *,
143 struct nfsd_diropargs *); 143 struct nfsd_diropargs *);
144int nfssvc_decode_readargs(struct svc_rqst *, u32 *, 144int nfssvc_decode_readargs(struct svc_rqst *, __be32 *,
145 struct nfsd_readargs *); 145 struct nfsd_readargs *);
146int nfssvc_decode_writeargs(struct svc_rqst *, u32 *, 146int nfssvc_decode_writeargs(struct svc_rqst *, __be32 *,
147 struct nfsd_writeargs *); 147 struct nfsd_writeargs *);
148int nfssvc_decode_createargs(struct svc_rqst *, u32 *, 148int nfssvc_decode_createargs(struct svc_rqst *, __be32 *,
149 struct nfsd_createargs *); 149 struct nfsd_createargs *);
150int nfssvc_decode_renameargs(struct svc_rqst *, u32 *, 150int nfssvc_decode_renameargs(struct svc_rqst *, __be32 *,
151 struct nfsd_renameargs *); 151 struct nfsd_renameargs *);
152int nfssvc_decode_readlinkargs(struct svc_rqst *, u32 *, 152int nfssvc_decode_readlinkargs(struct svc_rqst *, __be32 *,
153 struct nfsd_readlinkargs *); 153 struct nfsd_readlinkargs *);
154int nfssvc_decode_linkargs(struct svc_rqst *, u32 *, 154int nfssvc_decode_linkargs(struct svc_rqst *, __be32 *,
155 struct nfsd_linkargs *); 155 struct nfsd_linkargs *);
156int nfssvc_decode_symlinkargs(struct svc_rqst *, u32 *, 156int nfssvc_decode_symlinkargs(struct svc_rqst *, __be32 *,
157 struct nfsd_symlinkargs *); 157 struct nfsd_symlinkargs *);
158int nfssvc_decode_readdirargs(struct svc_rqst *, u32 *, 158int nfssvc_decode_readdirargs(struct svc_rqst *, __be32 *,
159 struct nfsd_readdirargs *); 159 struct nfsd_readdirargs *);
160int nfssvc_encode_void(struct svc_rqst *, u32 *, void *); 160int nfssvc_encode_void(struct svc_rqst *, __be32 *, void *);
161int nfssvc_encode_attrstat(struct svc_rqst *, u32 *, struct nfsd_attrstat *); 161int nfssvc_encode_attrstat(struct svc_rqst *, __be32 *, struct nfsd_attrstat *);
162int nfssvc_encode_diropres(struct svc_rqst *, u32 *, struct nfsd_diropres *); 162int nfssvc_encode_diropres(struct svc_rqst *, __be32 *, struct nfsd_diropres *);
163int nfssvc_encode_readlinkres(struct svc_rqst *, u32 *, struct nfsd_readlinkres *); 163int nfssvc_encode_readlinkres(struct svc_rqst *, __be32 *, struct nfsd_readlinkres *);
164int nfssvc_encode_readres(struct svc_rqst *, u32 *, struct nfsd_readres *); 164int nfssvc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd_readres *);
165int nfssvc_encode_statfsres(struct svc_rqst *, u32 *, struct nfsd_statfsres *); 165int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *, struct nfsd_statfsres *);
166int nfssvc_encode_readdirres(struct svc_rqst *, u32 *, struct nfsd_readdirres *); 166int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *, struct nfsd_readdirres *);
167 167
168int nfssvc_encode_entry(struct readdir_cd *, const char *name, 168int nfssvc_encode_entry(struct readdir_cd *, const char *name,
169 int namlen, loff_t offset, ino_t ino, unsigned int); 169 int namlen, loff_t offset, ino_t ino, unsigned int);
170 170
171int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); 171int nfssvc_release_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
172 172
173/* Helper functions for NFSv2 ACL code */ 173/* Helper functions for NFSv2 ACL code */
174u32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp); 174__be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp);
175u32 *nfs2svc_decode_fh(u32 *p, struct svc_fh *fhp); 175__be32 *nfs2svc_decode_fh(__be32 *p, struct svc_fh *fhp);
176 176
177#endif /* LINUX_NFSD_H */ 177#endif /* LINUX_NFSD_H */