diff options
author | Tao Ma <tao.ma@oracle.com> | 2010-09-13 08:00:23 +0200 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-09-23 23:16:21 +0200 |
commit | 12828061cdacfb1db3eb03fd71952d5ebc555bbb (patch) | |
tree | bbcaff70425e6a1f19d54292e9f647f0f3a2cabb /fs | |
parent | ocfs2/net: fix uninitialized ret in o2net_send_message_vec() (diff) | |
download | linux-12828061cdacfb1db3eb03fd71952d5ebc555bbb.tar.xz linux-12828061cdacfb1db3eb03fd71952d5ebc555bbb.zip |
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.c | 3 |
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); |