From b493e6528bf96122bbc47784fb8999de67f05a89 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 19 Oct 2006 23:28:54 -0700 Subject: [PATCH] --- yaml --- r: 39999 b: refs/heads/master c: 63f103111fdfc3cba00e4c94921d32362f375d93 h: refs/heads/master i: 39997: 030474f96204399ccc33453492881e8d32c56f49 39995: f834cf5d8d08f0b387173edbc3c409119b9c39c3 39991: b71cf13e09b3323a708554a656d50ec46f3d98fa 39983: 9ea56d87862ffbea778a8dc6a2fa59742b705ec9 39967: 8107d0ef35b6fe9191c899990898d6639a7254bb 39935: b6c8e1c1af01857c4703b74ccc9f998722120c20 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfsproc.c | 7 +++---- trunk/include/linux/nfsd/export.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 080024c46e84..660f036bc14e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 83bbe2ef63ec4f6a22aaaa0c03bd918b38300127 +refs/heads/master: 63f103111fdfc3cba00e4c94921d32362f375d93 diff --git a/trunk/fs/nfsd/nfsproc.c b/trunk/fs/nfsd/nfsproc.c index 09030afd7249..03ab6822291f 100644 --- a/trunk/fs/nfsd/nfsproc.c +++ b/trunk/fs/nfsd/nfsproc.c @@ -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; } diff --git a/trunk/include/linux/nfsd/export.h b/trunk/include/linux/nfsd/export.h index 6e78ea969f49..27666f5b8b53 100644 --- a/trunk/include/linux/nfsd/export.h +++ b/trunk/include/linux/nfsd/export.h @@ -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;