summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2010-09-13 10:00:23 +0400
committerJoel Becker <joel.becker@oracle.com>2010-09-24 01:16:21 +0400
commit12828061cdacfb1db3eb03fd71952d5ebc555bbb (patch)
treebbcaff70425e6a1f19d54292e9f647f0f3a2cabb /fs
parent50aff040363d31f87e94f38f1710973d99489951 (diff)
downloadlinux-12828061cdacfb1db3eb03fd71952d5ebc555bbb.tar.xz
ocfs2: update ctime when changing the file's permission by setfacl
In commit 30e2bab, ext3 fixed it. So change it accordingly in ocfs2. Steps to reproduce: # touch aaa # stat -c %Z aaa 1283760364 # setfacl -m 'u::x,g::x,o::x' aaa # stat -c %Z aaa 1283760364 Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/acl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c
index a76e0aa5cd3f..391915093fe1 100644
--- a/fs/ocfs2/acl.c
+++ b/fs/ocfs2/acl.c
@@ -209,7 +209,10 @@ static int ocfs2_acl_set_mode(struct inode *inode, struct buffer_head *di_bh,
}
inode->i_mode = new_mode;
+ inode->i_ctime = CURRENT_TIME;
di->i_mode = cpu_to_le16(inode->i_mode);
+ di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
+ di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
ocfs2_journal_dirty(handle, di_bh);