Skip to content

Commit dad5eb6

Browse files
jankaraAl Viro
authored andcommitted
vfs: update ctime when changing the file's permission by setfacl
generic_acl_set didn't update the ctime of the file when its permission was changed. Steps to reproduce: # touch aaa # stat -c %Z aaa 1275289822 # setfacl -m 'u::x,g::x,o::x' aaa # stat -c %Z aaa 1275289822 <- unchanged But, according to the spec of the ctime, vfs must update it. Port of ext3 patch by Miao Xie <miaox@cn.fujitsu.com>. CC: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent b845ff8 commit dad5eb6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎fs/generic_acl.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ generic_acl_set(struct dentry *dentry, const char *name, const void *value,
9494
if (error < 0)
9595
goto failed;
9696
inode->i_mode = mode;
97+
inode->i_ctime = CURRENT_TIME;
9798
if (error == 0) {
9899
posix_acl_release(acl);
99100
acl = NULL;

0 commit comments

Comments
 (0)