diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfsproc.c | 7 |
1 files changed, 3 insertions, 4 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 | */ |
582 | int | 582 | __be32 |
583 | nfserrno (int errno) | 583 | nfserrno (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 | } |