diff options
-rw-r--r-- | fs/nfsd/nfs2acl.c | 18 | ||||
-rw-r--r-- | fs/nfsd/nfsxdr.c | 72 | ||||
-rw-r--r-- | include/linux/nfsd/nfsd.h | 2 | ||||
-rw-r--r-- | include/linux/nfsd/xdr.h | 50 |
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 | */ |
161 | static int nfsaclsvc_decode_getaclargs(struct svc_rqst *rqstp, u32 *p, | 161 | static 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 | ||
172 | static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, u32 *p, | 172 | static 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 | ||
197 | static int nfsaclsvc_decode_fhandleargs(struct svc_rqst *rqstp, u32 *p, | 197 | static 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 | ||
205 | static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, u32 *p, | 205 | static 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 */ |
220 | static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, u32 *p, | 220 | static 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 | ||
262 | static int nfsaclsvc_encode_attrstatres(struct svc_rqst *rqstp, u32 *p, | 262 | static 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 */ |
270 | static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, u32 *p, | 270 | static 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 | */ |
281 | static int nfsaclsvc_release_getacl(struct svc_rqst *rqstp, u32 *p, | 281 | static 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 | ||
290 | static int nfsaclsvc_release_fhandle(struct svc_rqst *rqstp, u32 *p, | 290 | static 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 | */ |
40 | static u32 * | 40 | static __be32 * |
41 | decode_fh(u32 *p, struct svc_fh *fhp) | 41 | decode_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 */ |
53 | u32 *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 | ||
58 | static inline u32 * | 58 | static inline __be32 * |
59 | encode_fh(u32 *p, struct svc_fh *fhp) | 59 | encode_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 | */ |
69 | static inline u32 * | 69 | static inline __be32 * |
70 | decode_filename(u32 *p, char **namp, int *lenp) | 70 | decode_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 | ||
85 | static inline u32 * | 85 | static inline __be32 * |
86 | decode_pathname(u32 *p, char **namp, int *lenp) | 86 | decode_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 | ||
101 | static inline u32 * | 101 | static inline __be32 * |
102 | decode_sattr(u32 *p, struct iattr *iap) | 102 | decode_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 | ||
154 | static u32 * | 154 | static __be32 * |
155 | encode_fattr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp, | 155 | encode_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 */ |
198 | u32 *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 | */ |
208 | int | 208 | int |
209 | nfssvc_decode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) | 209 | nfssvc_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 | ||
214 | int | 214 | int |
215 | nfssvc_decode_fhandle(struct svc_rqst *rqstp, u32 *p, struct nfsd_fhandle *args) | 215 | nfssvc_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 | ||
222 | int | 222 | int |
223 | nfssvc_decode_sattrargs(struct svc_rqst *rqstp, u32 *p, | 223 | nfssvc_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 | ||
233 | int | 233 | int |
234 | nfssvc_decode_diropargs(struct svc_rqst *rqstp, u32 *p, | 234 | nfssvc_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 | ||
244 | int | 244 | int |
245 | nfssvc_decode_readargs(struct svc_rqst *rqstp, u32 *p, | 245 | nfssvc_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 | ||
275 | int | 275 | int |
276 | nfssvc_decode_writeargs(struct svc_rqst *rqstp, u32 *p, | 276 | nfssvc_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 | ||
305 | int | 305 | int |
306 | nfssvc_decode_createargs(struct svc_rqst *rqstp, u32 *p, | 306 | nfssvc_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 | ||
317 | int | 317 | int |
318 | nfssvc_decode_renameargs(struct svc_rqst *rqstp, u32 *p, | 318 | nfssvc_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 | ||
330 | int | 330 | int |
331 | nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, u32 *p, struct nfsd_readlinkargs *args) | 331 | nfssvc_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 | ||
340 | int | 340 | int |
341 | nfssvc_decode_linkargs(struct svc_rqst *rqstp, u32 *p, | 341 | nfssvc_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 | ||
352 | int | 352 | int |
353 | nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p, | 353 | nfssvc_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 | ||
365 | int | 365 | int |
366 | nfssvc_decode_readdirargs(struct svc_rqst *rqstp, u32 *p, | 366 | nfssvc_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 | */ |
384 | int | 384 | int |
385 | nfssvc_encode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) | 385 | nfssvc_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 | ||
390 | int | 390 | int |
391 | nfssvc_encode_attrstat(struct svc_rqst *rqstp, u32 *p, | 391 | nfssvc_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 | ||
398 | int | 398 | int |
399 | nfssvc_encode_diropres(struct svc_rqst *rqstp, u32 *p, | 399 | nfssvc_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 | ||
407 | int | 407 | int |
408 | nfssvc_encode_readlinkres(struct svc_rqst *rqstp, u32 *p, | 408 | nfssvc_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 | ||
423 | int | 423 | int |
424 | nfssvc_encode_readres(struct svc_rqst *rqstp, u32 *p, | 424 | nfssvc_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 | ||
442 | int | 442 | int |
443 | nfssvc_encode_readdirres(struct svc_rqst *rqstp, u32 *p, | 443 | nfssvc_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 | ||
455 | int | 455 | int |
456 | nfssvc_encode_statfsres(struct svc_rqst *rqstp, u32 *p, | 456 | nfssvc_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 | */ |
511 | int | 511 | int |
512 | nfssvc_release_fhandle(struct svc_rqst *rqstp, u32 *p, | 512 | nfssvc_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 | */ |
52 | struct readdir_cd { | 52 | struct readdir_cd { |
53 | int err; /* 0, nfserr, or nfserr_eof */ | 53 | __be32 err; /* 0, nfserr, or nfserr_eof */ |
54 | }; | 54 | }; |
55 | typedef int (*encode_dent_fn)(struct readdir_cd *, const char *, | 55 | typedef 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 | ||
87 | struct nfsd_attrstat { | 87 | struct 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 | ||
116 | struct nfsd_statfsres { | 116 | struct 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 | ||
138 | int nfssvc_decode_void(struct svc_rqst *, u32 *, void *); | 138 | int nfssvc_decode_void(struct svc_rqst *, __be32 *, void *); |
139 | int nfssvc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); | 139 | int nfssvc_decode_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *); |
140 | int nfssvc_decode_sattrargs(struct svc_rqst *, u32 *, | 140 | int nfssvc_decode_sattrargs(struct svc_rqst *, __be32 *, |
141 | struct nfsd_sattrargs *); | 141 | struct nfsd_sattrargs *); |
142 | int nfssvc_decode_diropargs(struct svc_rqst *, u32 *, | 142 | int nfssvc_decode_diropargs(struct svc_rqst *, __be32 *, |
143 | struct nfsd_diropargs *); | 143 | struct nfsd_diropargs *); |
144 | int nfssvc_decode_readargs(struct svc_rqst *, u32 *, | 144 | int nfssvc_decode_readargs(struct svc_rqst *, __be32 *, |
145 | struct nfsd_readargs *); | 145 | struct nfsd_readargs *); |
146 | int nfssvc_decode_writeargs(struct svc_rqst *, u32 *, | 146 | int nfssvc_decode_writeargs(struct svc_rqst *, __be32 *, |
147 | struct nfsd_writeargs *); | 147 | struct nfsd_writeargs *); |
148 | int nfssvc_decode_createargs(struct svc_rqst *, u32 *, | 148 | int nfssvc_decode_createargs(struct svc_rqst *, __be32 *, |
149 | struct nfsd_createargs *); | 149 | struct nfsd_createargs *); |
150 | int nfssvc_decode_renameargs(struct svc_rqst *, u32 *, | 150 | int nfssvc_decode_renameargs(struct svc_rqst *, __be32 *, |
151 | struct nfsd_renameargs *); | 151 | struct nfsd_renameargs *); |
152 | int nfssvc_decode_readlinkargs(struct svc_rqst *, u32 *, | 152 | int nfssvc_decode_readlinkargs(struct svc_rqst *, __be32 *, |
153 | struct nfsd_readlinkargs *); | 153 | struct nfsd_readlinkargs *); |
154 | int nfssvc_decode_linkargs(struct svc_rqst *, u32 *, | 154 | int nfssvc_decode_linkargs(struct svc_rqst *, __be32 *, |
155 | struct nfsd_linkargs *); | 155 | struct nfsd_linkargs *); |
156 | int nfssvc_decode_symlinkargs(struct svc_rqst *, u32 *, | 156 | int nfssvc_decode_symlinkargs(struct svc_rqst *, __be32 *, |
157 | struct nfsd_symlinkargs *); | 157 | struct nfsd_symlinkargs *); |
158 | int nfssvc_decode_readdirargs(struct svc_rqst *, u32 *, | 158 | int nfssvc_decode_readdirargs(struct svc_rqst *, __be32 *, |
159 | struct nfsd_readdirargs *); | 159 | struct nfsd_readdirargs *); |
160 | int nfssvc_encode_void(struct svc_rqst *, u32 *, void *); | 160 | int nfssvc_encode_void(struct svc_rqst *, __be32 *, void *); |
161 | int nfssvc_encode_attrstat(struct svc_rqst *, u32 *, struct nfsd_attrstat *); | 161 | int nfssvc_encode_attrstat(struct svc_rqst *, __be32 *, struct nfsd_attrstat *); |
162 | int nfssvc_encode_diropres(struct svc_rqst *, u32 *, struct nfsd_diropres *); | 162 | int nfssvc_encode_diropres(struct svc_rqst *, __be32 *, struct nfsd_diropres *); |
163 | int nfssvc_encode_readlinkres(struct svc_rqst *, u32 *, struct nfsd_readlinkres *); | 163 | int nfssvc_encode_readlinkres(struct svc_rqst *, __be32 *, struct nfsd_readlinkres *); |
164 | int nfssvc_encode_readres(struct svc_rqst *, u32 *, struct nfsd_readres *); | 164 | int nfssvc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd_readres *); |
165 | int nfssvc_encode_statfsres(struct svc_rqst *, u32 *, struct nfsd_statfsres *); | 165 | int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *, struct nfsd_statfsres *); |
166 | int nfssvc_encode_readdirres(struct svc_rqst *, u32 *, struct nfsd_readdirres *); | 166 | int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *, struct nfsd_readdirres *); |
167 | 167 | ||
168 | int nfssvc_encode_entry(struct readdir_cd *, const char *name, | 168 | int 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 | ||
171 | int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); | 171 | int 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 */ |
174 | u32 *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); |
175 | u32 *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 */ |