summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/acl.c
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2010-09-13 14:00:23 +0800
committerJoel Becker <joel.becker@oracle.com>2010-09-23 14:16:21 -0700
commit12828061cdacfb1db3eb03fd71952d5ebc555bbb (patch)
treebbcaff70425e6a1f19d54292e9f647f0f3a2cabb /fs/ocfs2/acl.c
parent50aff040363d31f87e94f38f1710973d99489951 (diff)
downloadop-kernel-dev-12828061cdacfb1db3eb03fd71952d5ebc555bbb.zip
op-kernel-dev-12828061cdacfb1db3eb03fd71952d5ebc555bbb.tar.gz
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/ocfs2/acl.c')
-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 a76e0aa..3919150 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);
OpenPOWER on IntegriCloud