diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-28 11:36:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-10 00:32:59 +0900 |
commit | 6ab5902511d32b50b4b973320979ba99693aa5be (patch) | |
tree | d82505ebfa2a512e74211dd7ef5a96a5169dac41 /fs | |
parent | 6ec1d66c8d22bc76ebf37860a87ca399790beb5d (diff) | |
download | lwn-6ab5902511d32b50b4b973320979ba99693aa5be.tar.gz lwn-6ab5902511d32b50b4b973320979ba99693aa5be.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')
-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 30f6548f2b99..b7a7e5fe4019 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -94,6 +94,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); |