All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NFSv3/acl: forget acl cache after setattr
@ 2018-03-28 10:12 chendt
  2018-03-28 20:48 ` Benjamin Coddington
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: chendt @ 2018-03-28 10:12 UTC (permalink / raw)
  To: linux-nfs; +Cc: Trond Myklebust

Sync of ACL with std permissions fail,do We need to forget the ACL
cache after setattr?

Reproduction:
#!/bin/bash
touch testfile
cat <<EOF >testfile
#!/bin/bash
echo "Test was executed"
EOF
chmod u=rwx testfile
chmod g=rw- testfile
chmod o=r-- testfile

chacl u::r--,g::rwx,o:rw- testfile
chmod u+w testfile
ls -ln testfile
chacl -l testfile

Output:
-rw-rwxrw- 1 root root 0 Mar 28 05:29 testfile
testfile [u::r--,g::rwx,o::rw-]

Signed-off-by: chendt.fnst <chendt.fnst@cn.fujitsu.com>
---
 fs/nfs/nfs3proc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
index 7327930..ef3e17c 100644
--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -140,6 +140,7 @@
 	status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
 	if (status == 0)
 		nfs_setattr_update_inode(inode, sattr, fattr);
+		forget_all_cached_acls(inode);
 	dprintk("NFS reply setattr: %d\n", status);
 	return status;
 }
-- 
1.8.3.1




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

end of thread, other threads:[~2018-03-29 11:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-28 10:12 [PATCH] NFSv3/acl: forget acl cache after setattr chendt
2018-03-28 20:48 ` Benjamin Coddington
2018-03-29  6:01 ` [PATCH v2] " chendt
2018-03-29  6:47   ` Kinglong Mee
2018-03-29  8:13 ` [PATCH v3] " chendt
2018-03-29 10:07 ` [PATCH] " kbuild test robot
2018-03-29 11:39 ` kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.