aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-10-20 02:28:54 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-20 13:26:41 -0400
commit63f103111fdfc3cba00e4c94921d32362f375d93 (patch)
treeb0c2e195d64ba2f70c982b069c46ba6eec2c4018
parent83bbe2ef63ec4f6a22aaaa0c03bd918b38300127 (diff)
[PATCH] nfsd: nfserrno() endianness annotations
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/nfsproc.c7
-rw-r--r--include/linux/nfsd/export.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
index 09030afd7249..03ab6822291f 100644
--- a/fs/nfsd/nfsproc.c
+++ b/fs/nfsd/nfsproc.c
@@ -579,11 +579,11 @@ struct svc_version nfsd_version2 = {
579/* 579/*
580 * Map errnos to NFS errnos. 580 * Map errnos to NFS errnos.
581 */ 581 */
582int 582__be32
583nfserrno (int errno) 583nfserrno (int errno)
584{ 584{
585 static struct { 585 static struct {
586 int nfserr; 586 __be32 nfserr;
587 int syserr; 587 int syserr;
588 } nfs_errtbl[] = { 588 } nfs_errtbl[] = {
589 { nfs_ok, 0 }, 589 { nfs_ok, 0 },
@@ -615,11 +615,10 @@ nfserrno (int errno)
615 { nfserr_badname, -ESRCH }, 615 { nfserr_badname, -ESRCH },
616 { nfserr_io, -ETXTBSY }, 616 { nfserr_io, -ETXTBSY },
617 { nfserr_notsupp, -EOPNOTSUPP }, 617 { nfserr_notsupp, -EOPNOTSUPP },
618 { -1, -EIO }
619 }; 618 };
620 int i; 619 int i;
621 620
622 for (i = 0; nfs_errtbl[i].nfserr != -1; i++) { 621 for (i = 0; i < ARRAY_SIZE(nfs_errtbl); i++) {
623 if (nfs_errtbl[i].syserr == errno) 622 if (nfs_errtbl[i].syserr == errno)
624 return nfs_errtbl[i].nfserr; 623 return nfs_errtbl[i].nfserr;
625 } 624 }
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index 6e78ea969f49..27666f5b8b53 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -118,7 +118,7 @@ struct svc_export * exp_parent(struct auth_domain *clp,
118int exp_rootfh(struct auth_domain *, 118int exp_rootfh(struct auth_domain *,
119 char *path, struct knfsd_fh *, int maxsize); 119 char *path, struct knfsd_fh *, int maxsize);
120int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq); 120int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq);
121int nfserrno(int errno); 121__be32 nfserrno(int errno);
122 122
123extern struct cache_detail svc_export_cache; 123extern struct cache_detail svc_export_cache;
124 124