summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-28 11:36:28 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-10 00:36:09 +0900
commit27b0a5338ea769a35f1c8346cd07a3c938c919e7 (patch)
treecf256d2fecb028dd7db205d9e2604c882a5882c0 /fs/nfs
parentc780682d113ef97164359897f4463585b4c27524 (diff)
downloadlinux-3.10-27b0a5338ea769a35f1c8346cd07a3c938c919e7.tar.gz
linux-3.10-27b0a5338ea769a35f1c8346cd07a3c938c919e7.tar.bz2
linux-3.10-27b0a5338ea769a35f1c8346cd07a3c938c919e7.zip
NFSv4: Map NFS4ERR_SHARE_DENIED into an EACCES error instead of EIO
commit fb13bfa7e1bcfdcfdece47c24b62f1a1cad957e9 upstream. If a file OPEN is denied due to a share lock, the resulting NFS4ERR_SHARE_DENIED is currently mapped to the default EIO. This patch adds a more appropriate mapping, and brings Linux into line with what Solaris 10 does. See https://bugzilla.kernel.org/show_bug.cgi?id=43286 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-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 99650aaf893..e9b1eb701a0 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -101,6 +101,8 @@ static int nfs4_map_errors(int err)
case -NFS4ERR_BADOWNER:
case -NFS4ERR_BADNAME:
return -EINVAL;
+ case -NFS4ERR_SHARE_DENIED:
+ return -EACCES;
default:
dprintk("%s could not handle NFSv4 error %d\n",
__func__, -err);