OSDN Git Service

NFSv3/acl: forget acl cache after setattr
authorchendt <chendt.fnst@cn.fujitsu.com>
Thu, 29 Mar 2018 08:13:09 +0000 (16:13 +0800)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 10 Apr 2018 20:06:22 +0000 (16:06 -0400)
commitdbc898ae107104ef49fd977a593e521fcefab5aa
tree94497c5cef27e9d4a08593833efeebd17c8ac13d
parent609339c123843ace16d6b17f10205cd61460ab02
NFSv3/acl: forget acl cache after setattr

Sync of ACL with std permissions fail,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 -l 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>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Kinglong Mee <Kinglong Mee>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs3proc.c