Commit 63f10311 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] nfsd: nfserrno() endianness annotations

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Acked-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
Acked-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 83bbe2ef
...@@ -579,11 +579,11 @@ struct svc_version nfsd_version2 = { ...@@ -579,11 +579,11 @@ struct svc_version nfsd_version2 = {
/* /*
* Map errnos to NFS errnos. * Map errnos to NFS errnos.
*/ */
int __be32
nfserrno (int errno) nfserrno (int errno)
{ {
static struct { static struct {
int nfserr; __be32 nfserr;
int syserr; int syserr;
} nfs_errtbl[] = { } nfs_errtbl[] = {
{ nfs_ok, 0 }, { nfs_ok, 0 },
...@@ -615,11 +615,10 @@ nfserrno (int errno) ...@@ -615,11 +615,10 @@ nfserrno (int errno)
{ nfserr_badname, -ESRCH }, { nfserr_badname, -ESRCH },
{ nfserr_io, -ETXTBSY }, { nfserr_io, -ETXTBSY },
{ nfserr_notsupp, -EOPNOTSUPP }, { nfserr_notsupp, -EOPNOTSUPP },
{ -1, -EIO }
}; };
int i; int i;
for (i = 0; nfs_errtbl[i].nfserr != -1; i++) { for (i = 0; i < ARRAY_SIZE(nfs_errtbl); i++) {
if (nfs_errtbl[i].syserr == errno) if (nfs_errtbl[i].syserr == errno)
return nfs_errtbl[i].nfserr; return nfs_errtbl[i].nfserr;
} }
......
...@@ -118,7 +118,7 @@ struct svc_export * exp_parent(struct auth_domain *clp, ...@@ -118,7 +118,7 @@ struct svc_export * exp_parent(struct auth_domain *clp,
int exp_rootfh(struct auth_domain *, int exp_rootfh(struct auth_domain *,
char *path, struct knfsd_fh *, int maxsize); char *path, struct knfsd_fh *, int maxsize);
int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq); int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq);
int nfserrno(int errno); __be32 nfserrno(int errno);
extern struct cache_detail svc_export_cache; extern struct cache_detail svc_export_cache;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment