]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] nfsd: nfserrno() endianness annotations
authorAl Viro <viro@ftp.linux.org.uk>
Fri, 20 Oct 2006 06:28:54 +0000 (23:28 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 20 Oct 2006 17:26:41 +0000 (10:26 -0700)
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>
fs/nfsd/nfsproc.c
include/linux/nfsd/export.h

index 09030afd72493ca602ce039f053f000048d20ca0..03ab6822291ff8b10689411ff4fa4a03d5a18939 100644 (file)
@@ -579,11 +579,11 @@ struct svc_version        nfsd_version2 = {
 /*
  * Map errnos to NFS errnos.
  */
-int
+__be32
 nfserrno (int errno)
 {
        static struct {
-               int     nfserr;
+               __be32  nfserr;
                int     syserr;
        } nfs_errtbl[] = {
                { nfs_ok, 0 },
@@ -615,11 +615,10 @@ nfserrno (int errno)
                { nfserr_badname, -ESRCH },
                { nfserr_io, -ETXTBSY },
                { nfserr_notsupp, -EOPNOTSUPP },
-               { -1, -EIO }
        };
        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)
                        return nfs_errtbl[i].nfserr;
        }
index 6e78ea969f4935977559495a1a0f139bc2423735..27666f5b8b53ae3b978cce54c981c81cb41cff75 100644 (file)
@@ -118,7 +118,7 @@ struct svc_export * exp_parent(struct auth_domain *clp,
 int                    exp_rootfh(struct auth_domain *, 
                                        char *path, struct knfsd_fh *, int maxsize);
 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;