diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-02-08 09:32:40 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-02-09 14:29:29 -0500 |
commit | fdcb45777a3d1689c5541e1f85ee3ebbd197d2c1 (patch) | |
tree | e0fccac2d5b21b0ea0dbddc9ce7ccd50de341131 /fs/nfs/nfs4xdr.c | |
parent | 7549ad5f9b6eda49bbac4b14c5b8f37bf464f922 (diff) |
NFS: Fix the mapping of the NFSERR_SERVERFAULT error
It was recently pointed out that the NFSERR_SERVERFAULT error, which is
designed to inform the user of a serious internal error on the server, was
being mapped to an error value that is internal to the kernel.
This patch maps it to the error EREMOTEIO, which is exported to userland
through errno.h.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index e437fd6a819f..5cd5184b56db 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -4631,7 +4631,7 @@ static int decode_sequence(struct xdr_stream *xdr, | |||
4631 | * If the server returns different values for sessionID, slotID or | 4631 | * If the server returns different values for sessionID, slotID or |
4632 | * sequence number, the server is looney tunes. | 4632 | * sequence number, the server is looney tunes. |
4633 | */ | 4633 | */ |
4634 | status = -ESERVERFAULT; | 4634 | status = -EREMOTEIO; |
4635 | 4635 | ||
4636 | if (memcmp(id.data, res->sr_session->sess_id.data, | 4636 | if (memcmp(id.data, res->sr_session->sess_id.data, |
4637 | NFS4_MAX_SESSIONID_LEN)) { | 4637 | NFS4_MAX_SESSIONID_LEN)) { |
@@ -5774,7 +5774,7 @@ static struct { | |||
5774 | { NFS4ERR_BAD_COOKIE, -EBADCOOKIE }, | 5774 | { NFS4ERR_BAD_COOKIE, -EBADCOOKIE }, |
5775 | { NFS4ERR_NOTSUPP, -ENOTSUPP }, | 5775 | { NFS4ERR_NOTSUPP, -ENOTSUPP }, |
5776 | { NFS4ERR_TOOSMALL, -ETOOSMALL }, | 5776 | { NFS4ERR_TOOSMALL, -ETOOSMALL }, |
5777 | { NFS4ERR_SERVERFAULT, -ESERVERFAULT }, | 5777 | { NFS4ERR_SERVERFAULT, -EREMOTEIO }, |
5778 | { NFS4ERR_BADTYPE, -EBADTYPE }, | 5778 | { NFS4ERR_BADTYPE, -EBADTYPE }, |
5779 | { NFS4ERR_LOCKED, -EAGAIN }, | 5779 | { NFS4ERR_LOCKED, -EAGAIN }, |
5780 | { NFS4ERR_SYMLINK, -ELOOP }, | 5780 | { NFS4ERR_SYMLINK, -ELOOP }, |
@@ -5801,7 +5801,7 @@ nfs4_stat_to_errno(int stat) | |||
5801 | } | 5801 | } |
5802 | if (stat <= 10000 || stat > 10100) { | 5802 | if (stat <= 10000 || stat > 10100) { |
5803 | /* The server is looney tunes. */ | 5803 | /* The server is looney tunes. */ |
5804 | return -ESERVERFAULT; | 5804 | return -EREMOTEIO; |
5805 | } | 5805 | } |
5806 | /* If we cannot translate the error, the recovery routines should | 5806 | /* If we cannot translate the error, the recovery routines should |
5807 | * handle it. | 5807 | * handle it. |