diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-28 11:36:28 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-28 17:21:48 -0400 |
commit | fb13bfa7e1bcfdcfdece47c24b62f1a1cad957e9 (patch) | |
tree | e4df7a2bb6737e6e725c7b333e824a9edf77a98f /fs | |
parent | 359d7d1c976851c658aa7085761015812ed3b56f (diff) |
NFSv4: Map NFS4ERR_SHARE_DENIED into an EACCES error instead of EIO
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>
Cc: stable@vger.kernel.org
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index af2db2c49c5f..42d9e9ca7d2f 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -103,6 +103,8 @@ static int nfs4_map_errors(int err) | |||
103 | case -NFS4ERR_BADOWNER: | 103 | case -NFS4ERR_BADOWNER: |
104 | case -NFS4ERR_BADNAME: | 104 | case -NFS4ERR_BADNAME: |
105 | return -EINVAL; | 105 | return -EINVAL; |
106 | case -NFS4ERR_SHARE_DENIED: | ||
107 | return -EACCES; | ||
106 | default: | 108 | default: |
107 | dprintk("%s could not handle NFSv4 error %d\n", | 109 | dprintk("%s could not handle NFSv4 error %d\n", |
108 | __func__, -err); | 110 | __func__, -err); |