]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ext3: update ctime when changing the file's permission by setfacl
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 27 May 2010 08:28:40 +0000 (16:28 +0800)
committerJan Kara <jack@suse.cz>
Thu, 24 Jun 2010 23:20:37 +0000 (01:20 +0200)
ext3 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, ext3 must update it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/acl.c

index 01552abbca3c0f9c47549ed6be812074a7632f1d..8a11fe212183529e225dee8a812264de5053b9d0 100644 (file)
@@ -205,6 +205,7 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type,
                                        return error;
                                else {
                                        inode->i_mode = mode;
+                                       inode->i_ctime = CURRENT_TIME_SEC;
                                        ext3_mark_inode_dirty(handle, inode);
                                        if (error == 0)
                                                acl = NULL;