diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-10-20 02:29:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-20 13:26:42 -0400 |
commit | c4d987ba841dff4b2fc768e52d1d95af83f9f157 (patch) | |
tree | a898ebcde19d2e06b9fa2053caba06a75f8b526b /fs/nfsd/nfsproc.c | |
parent | b37ad28bcaa7c486a4ff0fb6c3bdaaacd67b86ce (diff) |
[PATCH] nfsd: NFSv{2,3} trivial endianness annotations for error values
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>
Diffstat (limited to 'fs/nfsd/nfsproc.c')
-rw-r--r-- | fs/nfsd/nfsproc.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index 03ab6822291f..ec983b777680 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c | |||
@@ -36,16 +36,16 @@ nfsd_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) | |||
36 | return nfs_ok; | 36 | return nfs_ok; |
37 | } | 37 | } |
38 | 38 | ||
39 | static int | 39 | static __be32 |
40 | nfsd_return_attrs(int err, struct nfsd_attrstat *resp) | 40 | nfsd_return_attrs(__be32 err, struct nfsd_attrstat *resp) |
41 | { | 41 | { |
42 | if (err) return err; | 42 | if (err) return err; |
43 | return nfserrno(vfs_getattr(resp->fh.fh_export->ex_mnt, | 43 | return nfserrno(vfs_getattr(resp->fh.fh_export->ex_mnt, |
44 | resp->fh.fh_dentry, | 44 | resp->fh.fh_dentry, |
45 | &resp->stat)); | 45 | &resp->stat)); |
46 | } | 46 | } |
47 | static int | 47 | static __be32 |
48 | nfsd_return_dirop(int err, struct nfsd_diropres *resp) | 48 | nfsd_return_dirop(__be32 err, struct nfsd_diropres *resp) |
49 | { | 49 | { |
50 | if (err) return err; | 50 | if (err) return err; |
51 | return nfserrno(vfs_getattr(resp->fh.fh_export->ex_mnt, | 51 | return nfserrno(vfs_getattr(resp->fh.fh_export->ex_mnt, |
@@ -60,7 +60,7 @@ static __be32 | |||
60 | nfsd_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp, | 60 | nfsd_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp, |
61 | struct nfsd_attrstat *resp) | 61 | struct nfsd_attrstat *resp) |
62 | { | 62 | { |
63 | int nfserr; | 63 | __be32 nfserr; |
64 | dprintk("nfsd: GETATTR %s\n", SVCFH_fmt(&argp->fh)); | 64 | dprintk("nfsd: GETATTR %s\n", SVCFH_fmt(&argp->fh)); |
65 | 65 | ||
66 | fh_copy(&resp->fh, &argp->fh); | 66 | fh_copy(&resp->fh, &argp->fh); |
@@ -76,7 +76,7 @@ static __be32 | |||
76 | nfsd_proc_setattr(struct svc_rqst *rqstp, struct nfsd_sattrargs *argp, | 76 | nfsd_proc_setattr(struct svc_rqst *rqstp, struct nfsd_sattrargs *argp, |
77 | struct nfsd_attrstat *resp) | 77 | struct nfsd_attrstat *resp) |
78 | { | 78 | { |
79 | int nfserr; | 79 | __be32 nfserr; |
80 | dprintk("nfsd: SETATTR %s, valid=%x, size=%ld\n", | 80 | dprintk("nfsd: SETATTR %s, valid=%x, size=%ld\n", |
81 | SVCFH_fmt(&argp->fh), | 81 | SVCFH_fmt(&argp->fh), |
82 | argp->attrs.ia_valid, (long) argp->attrs.ia_size); | 82 | argp->attrs.ia_valid, (long) argp->attrs.ia_size); |
@@ -96,7 +96,7 @@ static __be32 | |||
96 | nfsd_proc_lookup(struct svc_rqst *rqstp, struct nfsd_diropargs *argp, | 96 | nfsd_proc_lookup(struct svc_rqst *rqstp, struct nfsd_diropargs *argp, |
97 | struct nfsd_diropres *resp) | 97 | struct nfsd_diropres *resp) |
98 | { | 98 | { |
99 | int nfserr; | 99 | __be32 nfserr; |
100 | 100 | ||
101 | dprintk("nfsd: LOOKUP %s %.*s\n", | 101 | dprintk("nfsd: LOOKUP %s %.*s\n", |
102 | SVCFH_fmt(&argp->fh), argp->len, argp->name); | 102 | SVCFH_fmt(&argp->fh), argp->len, argp->name); |
@@ -116,7 +116,7 @@ static __be32 | |||
116 | nfsd_proc_readlink(struct svc_rqst *rqstp, struct nfsd_readlinkargs *argp, | 116 | nfsd_proc_readlink(struct svc_rqst *rqstp, struct nfsd_readlinkargs *argp, |
117 | struct nfsd_readlinkres *resp) | 117 | struct nfsd_readlinkres *resp) |
118 | { | 118 | { |
119 | int nfserr; | 119 | __be32 nfserr; |
120 | 120 | ||
121 | dprintk("nfsd: READLINK %s\n", SVCFH_fmt(&argp->fh)); | 121 | dprintk("nfsd: READLINK %s\n", SVCFH_fmt(&argp->fh)); |
122 | 122 | ||
@@ -136,7 +136,7 @@ static __be32 | |||
136 | nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp, | 136 | nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp, |
137 | struct nfsd_readres *resp) | 137 | struct nfsd_readres *resp) |
138 | { | 138 | { |
139 | int nfserr; | 139 | __be32 nfserr; |
140 | 140 | ||
141 | dprintk("nfsd: READ %s %d bytes at %d\n", | 141 | dprintk("nfsd: READ %s %d bytes at %d\n", |
142 | SVCFH_fmt(&argp->fh), | 142 | SVCFH_fmt(&argp->fh), |
@@ -176,7 +176,7 @@ static __be32 | |||
176 | nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp, | 176 | nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp, |
177 | struct nfsd_attrstat *resp) | 177 | struct nfsd_attrstat *resp) |
178 | { | 178 | { |
179 | int nfserr; | 179 | __be32 nfserr; |
180 | int stable = 1; | 180 | int stable = 1; |
181 | 181 | ||
182 | dprintk("nfsd: WRITE %s %d bytes at %d\n", | 182 | dprintk("nfsd: WRITE %s %d bytes at %d\n", |
@@ -206,7 +206,8 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp, | |||
206 | struct iattr *attr = &argp->attrs; | 206 | struct iattr *attr = &argp->attrs; |
207 | struct inode *inode; | 207 | struct inode *inode; |
208 | struct dentry *dchild; | 208 | struct dentry *dchild; |
209 | int nfserr, type, mode; | 209 | int type, mode; |
210 | __be32 nfserr; | ||
210 | dev_t rdev = 0, wanted = new_decode_dev(attr->ia_size); | 211 | dev_t rdev = 0, wanted = new_decode_dev(attr->ia_size); |
211 | 212 | ||
212 | dprintk("nfsd: CREATE %s %.*s\n", | 213 | dprintk("nfsd: CREATE %s %.*s\n", |
@@ -352,7 +353,7 @@ static __be32 | |||
352 | nfsd_proc_remove(struct svc_rqst *rqstp, struct nfsd_diropargs *argp, | 353 | nfsd_proc_remove(struct svc_rqst *rqstp, struct nfsd_diropargs *argp, |
353 | void *resp) | 354 | void *resp) |
354 | { | 355 | { |
355 | int nfserr; | 356 | __be32 nfserr; |
356 | 357 | ||
357 | dprintk("nfsd: REMOVE %s %.*s\n", SVCFH_fmt(&argp->fh), | 358 | dprintk("nfsd: REMOVE %s %.*s\n", SVCFH_fmt(&argp->fh), |
358 | argp->len, argp->name); | 359 | argp->len, argp->name); |
@@ -367,7 +368,7 @@ static __be32 | |||
367 | nfsd_proc_rename(struct svc_rqst *rqstp, struct nfsd_renameargs *argp, | 368 | nfsd_proc_rename(struct svc_rqst *rqstp, struct nfsd_renameargs *argp, |
368 | void *resp) | 369 | void *resp) |
369 | { | 370 | { |
370 | int nfserr; | 371 | __be32 nfserr; |
371 | 372 | ||
372 | dprintk("nfsd: RENAME %s %.*s -> \n", | 373 | dprintk("nfsd: RENAME %s %.*s -> \n", |
373 | SVCFH_fmt(&argp->ffh), argp->flen, argp->fname); | 374 | SVCFH_fmt(&argp->ffh), argp->flen, argp->fname); |
@@ -385,7 +386,7 @@ static __be32 | |||
385 | nfsd_proc_link(struct svc_rqst *rqstp, struct nfsd_linkargs *argp, | 386 | nfsd_proc_link(struct svc_rqst *rqstp, struct nfsd_linkargs *argp, |
386 | void *resp) | 387 | void *resp) |
387 | { | 388 | { |
388 | int nfserr; | 389 | __be32 nfserr; |
389 | 390 | ||
390 | dprintk("nfsd: LINK %s ->\n", | 391 | dprintk("nfsd: LINK %s ->\n", |
391 | SVCFH_fmt(&argp->ffh)); | 392 | SVCFH_fmt(&argp->ffh)); |
@@ -406,7 +407,7 @@ nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp, | |||
406 | void *resp) | 407 | void *resp) |
407 | { | 408 | { |
408 | struct svc_fh newfh; | 409 | struct svc_fh newfh; |
409 | int nfserr; | 410 | __be32 nfserr; |
410 | 411 | ||
411 | dprintk("nfsd: SYMLINK %s %.*s -> %.*s\n", | 412 | dprintk("nfsd: SYMLINK %s %.*s -> %.*s\n", |
412 | SVCFH_fmt(&argp->ffh), argp->flen, argp->fname, | 413 | SVCFH_fmt(&argp->ffh), argp->flen, argp->fname, |
@@ -434,7 +435,7 @@ static __be32 | |||
434 | nfsd_proc_mkdir(struct svc_rqst *rqstp, struct nfsd_createargs *argp, | 435 | nfsd_proc_mkdir(struct svc_rqst *rqstp, struct nfsd_createargs *argp, |
435 | struct nfsd_diropres *resp) | 436 | struct nfsd_diropres *resp) |
436 | { | 437 | { |
437 | int nfserr; | 438 | __be32 nfserr; |
438 | 439 | ||
439 | dprintk("nfsd: MKDIR %s %.*s\n", SVCFH_fmt(&argp->fh), argp->len, argp->name); | 440 | dprintk("nfsd: MKDIR %s %.*s\n", SVCFH_fmt(&argp->fh), argp->len, argp->name); |
440 | 441 | ||
@@ -458,7 +459,7 @@ static __be32 | |||
458 | nfsd_proc_rmdir(struct svc_rqst *rqstp, struct nfsd_diropargs *argp, | 459 | nfsd_proc_rmdir(struct svc_rqst *rqstp, struct nfsd_diropargs *argp, |
459 | void *resp) | 460 | void *resp) |
460 | { | 461 | { |
461 | int nfserr; | 462 | __be32 nfserr; |
462 | 463 | ||
463 | dprintk("nfsd: RMDIR %s %.*s\n", SVCFH_fmt(&argp->fh), argp->len, argp->name); | 464 | dprintk("nfsd: RMDIR %s %.*s\n", SVCFH_fmt(&argp->fh), argp->len, argp->name); |
464 | 465 | ||
@@ -474,7 +475,8 @@ static __be32 | |||
474 | nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp, | 475 | nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp, |
475 | struct nfsd_readdirres *resp) | 476 | struct nfsd_readdirres *resp) |
476 | { | 477 | { |
477 | int nfserr, count; | 478 | int count; |
479 | __be32 nfserr; | ||
478 | loff_t offset; | 480 | loff_t offset; |
479 | 481 | ||
480 | dprintk("nfsd: READDIR %s %d bytes at %d\n", | 482 | dprintk("nfsd: READDIR %s %d bytes at %d\n", |
@@ -513,7 +515,7 @@ static __be32 | |||
513 | nfsd_proc_statfs(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, | 515 | nfsd_proc_statfs(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, |
514 | struct nfsd_statfsres *resp) | 516 | struct nfsd_statfsres *resp) |
515 | { | 517 | { |
516 | int nfserr; | 518 | __be32 nfserr; |
517 | 519 | ||
518 | dprintk("nfsd: STATFS %s\n", SVCFH_fmt(&argp->fh)); | 520 | dprintk("nfsd: STATFS %s\n", SVCFH_fmt(&argp->fh)); |
519 | 521 | ||