nfs42: client needs to strip file mode's suid/sgid bit after ALLOCATE op
authorDai Ngo <dai.ngo@oracle.com>
Tue, 19 Sep 2023 06:30:20 +0000 (23:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 10:03:14 +0000 (12:03 +0200)
commita54974b0076f028f3533e6bb07f7652fc1b913ab
tree61e2616ec8c7c4db06988d3ac747539bf0d526fb
parent8d69b47443e8119d03a6e4f0bfcbf33f83e755a4
nfs42: client needs to strip file mode's suid/sgid bit after ALLOCATE op

commit f588d72bd95f748849685412b1f0c7959ca228cf upstream.

The Linux NFS server strips the SUID and SGID from the file mode
on ALLOCATE op.

Modify _nfs42_proc_fallocate to add NFS_INO_REVAL_FORCED to
nfs_set_cache_invalid's argument to force update of the file
mode suid/sgid bit.

Suggested-by: Trond Myklebust <trondmy@hammerspace.com>
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Tested-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs42proc.c