summaryrefslogtreecommitdiff
path: root/fs/jffs2/acl.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2010-06-04 19:07:55 +0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-06-06 14:27:10 +0400
commit1c24d06f8e065023ebb428db5af5514500839ee6 (patch)
tree7129de8867c8b3e7700ae0b1a2310c6fcb60ef16 /fs/jffs2/acl.c
parente72e6497e74811e01d72b4c1b7537b3aea3ee857 (diff)
downloadlinux-1c24d06f8e065023ebb428db5af5514500839ee6.tar.xz
jffs2: update ctime when changing the file's permission by setfacl
jffs2 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, jffs2 must update it. Port of ext3 patch by Miao Xie <miaox@cn.fujitsu.com>. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/jffs2/acl.c')
-rw-r--r--fs/jffs2/acl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index 7cdc3196476a..64d3b4b48dbf 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -234,8 +234,9 @@ static int jffs2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
if (inode->i_mode != mode) {
struct iattr attr;
- attr.ia_valid = ATTR_MODE;
+ attr.ia_valid = ATTR_MODE | ATTR_CTIME;
attr.ia_mode = mode;
+ attr.ia_ctime = CURRENT_TIME_SEC;
rc = jffs2_do_setattr(inode, &attr);
if (rc < 0)
return rc;