Skip to content

Commit 3ddeb7c

Browse files
Trond MyklebustTrond Myklebust
authored andcommitted
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: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent e4fd72a commit 3ddeb7c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

fs/nfs/nfs4proc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ static int nfs4_map_errors(int err)
8585
switch (err) {
8686
case -NFS4ERR_RESOURCE:
8787
return -EREMOTEIO;
88+
case -NFS4ERR_BADOWNER:
89+
case -NFS4ERR_BADNAME:
90+
return -EINVAL;
8891
default:
8992
dprintk("%s could not handle NFSv4 error %d\n",
9093
__func__, -err);

fs/nfs/nfs4xdr.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6171,8 +6171,6 @@ static struct {
61716171
{ NFS4ERR_DQUOT, -EDQUOT },
61726172
{ NFS4ERR_STALE, -ESTALE },
61736173
{ NFS4ERR_BADHANDLE, -EBADHANDLE },
6174-
{ NFS4ERR_BADOWNER, -EINVAL },
6175-
{ NFS4ERR_BADNAME, -EINVAL },
61766174
{ NFS4ERR_BAD_COOKIE, -EBADCOOKIE },
61776175
{ NFS4ERR_NOTSUPP, -ENOTSUPP },
61786176
{ NFS4ERR_TOOSMALL, -ETOOSMALL },

0 commit comments

Comments
 (0)