linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/1] nfs42: client needs to update file mode after ALLOCATE op
@ 2023-08-24 15:53 Dai Ngo
  2023-08-24 16:01 ` Trond Myklebust
  0 siblings, 1 reply; 10+ messages in thread
From: Dai Ngo @ 2023-08-24 15:53 UTC (permalink / raw)
  To: trondmy, anna; +Cc: linux-nfs

The Linux NFS server strips the SUID and SGID from the file mode
on ALLOCATE op. The GETATTR op in the ALLOCATE compound needs to
request the file mode from the server to update its file mode in
case the SUID/SGUI bit were stripped.

Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
---
 fs/nfs/nfs42proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index 63802d195556..d3d050171822 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -70,7 +70,7 @@ static int _nfs42_proc_fallocate(struct rpc_message *msg, struct file *filep,
 	}
 
 	nfs4_bitmask_set(bitmask, server->cache_consistency_bitmask, inode,
-			 NFS_INO_INVALID_BLOCKS);
+			NFS_INO_INVALID_BLOCKS | NFS_INO_INVALID_MODE);
 
 	res.falloc_fattr = nfs_alloc_fattr();
 	if (!res.falloc_fattr)
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-08-24 23:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 15:53 [PATCH v2 1/1] nfs42: client needs to update file mode after ALLOCATE op Dai Ngo
2023-08-24 16:01 ` Trond Myklebust
2023-08-24 16:12   ` dai.ngo
2023-08-24 16:34     ` Trond Myklebust
2023-08-24 16:38       ` dai.ngo
2023-08-24 18:42         ` dai.ngo
2023-08-24 19:01           ` Trond Myklebust
2023-08-24 20:05             ` Dai Ngo
2023-08-24 22:26               ` dai.ngo
2023-08-24 23:01                 ` dai.ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).