Commit 3ddeb7c5 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: Propagate the error NFS4ERR_BADOWNER to nfs4_do_setattr

This will be required in order to switch uid/gid mapping back on if the
admin has tried to disable it.

Note that we also propagate NFS4ERR_BADNAME at the same time, in order to
work around a Linux server bug.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent e4fd72a1
...@@ -85,6 +85,9 @@ static int nfs4_map_errors(int err) ...@@ -85,6 +85,9 @@ static int nfs4_map_errors(int err)
switch (err) { switch (err) {
case -NFS4ERR_RESOURCE: case -NFS4ERR_RESOURCE:
return -EREMOTEIO; return -EREMOTEIO;
case -NFS4ERR_BADOWNER:
case -NFS4ERR_BADNAME:
return -EINVAL;
default: default:
dprintk("%s could not handle NFSv4 error %d\n", dprintk("%s could not handle NFSv4 error %d\n",
__func__, -err); __func__, -err);
......
...@@ -6171,8 +6171,6 @@ static struct { ...@@ -6171,8 +6171,6 @@ static struct {
{ NFS4ERR_DQUOT, -EDQUOT }, { NFS4ERR_DQUOT, -EDQUOT },
{ NFS4ERR_STALE, -ESTALE }, { NFS4ERR_STALE, -ESTALE },
{ NFS4ERR_BADHANDLE, -EBADHANDLE }, { NFS4ERR_BADHANDLE, -EBADHANDLE },
{ NFS4ERR_BADOWNER, -EINVAL },
{ NFS4ERR_BADNAME, -EINVAL },
{ NFS4ERR_BAD_COOKIE, -EBADCOOKIE }, { NFS4ERR_BAD_COOKIE, -EBADCOOKIE },
{ NFS4ERR_NOTSUPP, -ENOTSUPP }, { NFS4ERR_NOTSUPP, -ENOTSUPP },
{ NFS4ERR_TOOSMALL, -ETOOSMALL }, { NFS4ERR_TOOSMALL, -ETOOSMALL },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment