8c9400c485
commit f8849e206ef52b584cd9227255f4724f0cc900bb upstream. Currently if __nfs4_proc_set_acl fails with NFS4ERR_BADOWNER it re-enables the idmapper by clearing NFS_CAP_UIDGID_NOMAP before retrying again. The NFS_CAP_UIDGID_NOMAP remains cleared even if the retry fails. This causes problem for subsequent setattr requests for v4 server that does not have idmapping configured. This patch modifies nfs4_proc_set_acl to detect NFS4ERR_BADOWNER and NFS4ERR_BADNAME and skips the retry, since the kernel isn't involved in encoding the ACEs, and return -EINVAL. Steps to reproduce the problem: # mount -o vers=4.1,sec=sys server:/export/test /tmp/mnt # touch /tmp/mnt/file1 # chown 99 /tmp/mnt/file1 # nfs4_setfacl -a A::unknown.user@xyz.com:wrtncy /tmp/mnt/file1 Failed setxattr operation: Invalid argument # chown 99 /tmp/mnt/file1 chown: changing ownership of ‘/tmp/mnt/file1’: Invalid argument # umount /tmp/mnt # mount -o vers=4.1,sec=sys server:/export/test /tmp/mnt # chown 99 /tmp/mnt/file1 # v2: detect NFS4ERR_BADOWNER and NFS4ERR_BADNAME and skip retry in nfs4_proc_set_acl. Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
blocklayout | ||
filelayout | ||
flexfilelayout | ||
cache_lib.c | ||
cache_lib.h | ||
callback_proc.c | ||
callback_xdr.c | ||
callback.c | ||
callback.h | ||
client.c | ||
delegation.c | ||
delegation.h | ||
dir.c | ||
direct.c | ||
dns_resolve.c | ||
dns_resolve.h | ||
export.c | ||
file.c | ||
fscache-index.c | ||
fscache.c | ||
fscache.h | ||
getroot.c | ||
inode.c | ||
internal.h | ||
io.c | ||
iostat.h | ||
Kconfig | ||
Makefile | ||
mount_clnt.c | ||
namespace.c | ||
netns.h | ||
nfs2super.c | ||
nfs2xdr.c | ||
nfs3_fs.h | ||
nfs3acl.c | ||
nfs3client.c | ||
nfs3proc.c | ||
nfs3super.c | ||
nfs3xdr.c | ||
nfs4_fs.h | ||
nfs4client.c | ||
nfs4file.c | ||
nfs4getroot.c | ||
nfs4idmap.c | ||
nfs4idmap.h | ||
nfs4namespace.c | ||
nfs4proc.c | ||
nfs4renewd.c | ||
nfs4session.c | ||
nfs4session.h | ||
nfs4state.c | ||
nfs4super.c | ||
nfs4sysctl.c | ||
nfs4trace.c | ||
nfs4trace.h | ||
nfs4xdr.c | ||
nfs42.h | ||
nfs42proc.c | ||
nfs42xdr.c | ||
nfs.h | ||
nfsroot.c | ||
nfstrace.c | ||
nfstrace.h | ||
pagelist.c | ||
pnfs_dev.c | ||
pnfs_nfs.c | ||
pnfs.c | ||
pnfs.h | ||
proc.c | ||
read.c | ||
super.c | ||
symlink.c | ||
sysctl.c | ||
sysfs.c | ||
sysfs.h | ||
unlink.c | ||
write.c |