]> git.itanic.dy.fi Git - linux-stable/commit
NFSv4.2: Update mode bits after ALLOCATE and DEALLOCATE
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 7 Sep 2022 20:34:21 +0000 (16:34 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2022 12:14:02 +0000 (14:14 +0200)
commit4d9f296e78b07924833bc1226c0536072f29cf90
tree98f0446e41c8d057196d079f3f54dff7f8d559e3
parent2f0a154b16ab76c52ef1a82bf203eb77dd973acb
NFSv4.2: Update mode bits after ALLOCATE and DEALLOCATE

[ Upstream commit d7a5118635e725d195843bda80cc5c964d93ef31 ]

The fallocate call invalidates suid and sgid bits as part of normal
operation. We need to mark the mode bits as invalid when using fallocate
with an suid so these will be updated the next time the user looks at them.

This fixes xfstests generic/683 and generic/684.

Reported-by: Yue Cui <cuiyue-fnst@fujitsu.com>
Fixes: 913eca1aea87 ("NFS: Fallocate should use the nfs4_fattr_bitmap")
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/internal.h
fs/nfs/nfs42proc.c
fs/nfs/write.c