summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2012-06-06 20:12:07 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-06 20:32:40 +0200
commitf25efd851cc8c0f63d74334bc784a437f4df8ee4 (patch)
treefc3c0f010771cc7b3a1a7dca46ac41b187816627 /fs
parentNFS: Fix a commit bug (diff)
downloadlinux-f25efd851cc8c0f63d74334bc784a437f4df8ee4.tar.xz
linux-f25efd851cc8c0f63d74334bc784a437f4df8ee4.zip
NFS: Map minor mismatch error to protocol not support error.
Sservers that only have NFSv4.1 support the NFS4ERR_MINOR_VERS_MISMATCH error is return on v4.0 mounts. Mapping that error to EPROTONOSUPPORT will cause the mount to back off to v3 instead of failing. Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 7c218fd1ec21..bfc919fd3f06 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -105,6 +105,8 @@ static int nfs4_map_errors(int err)
return -EINVAL;
case -NFS4ERR_SHARE_DENIED:
return -EACCES;
+ case -NFS4ERR_MINOR_VERS_MISMATCH:
+ return -EPROTONOSUPPORT;
default:
dprintk("%s could not handle NFSv4 error %d\n",
__func__, -err);