* [Ocfs2-devel] [PATCH] ocfs2: update ctime when changing the file's permission by setfacl
@ 2010-09-13 6:00 Tao Ma
2010-09-23 21:22 ` Joel Becker
0 siblings, 1 reply; 2+ messages in thread
From: Tao Ma @ 2010-09-13 6:00 UTC (permalink / raw)
To: ocfs2-devel
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>
---
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 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);
--
1.7.1.GIT
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2: update ctime when changing the file's permission by setfacl
2010-09-13 6:00 [Ocfs2-devel] [PATCH] ocfs2: update ctime when changing the file's permission by setfacl Tao Ma
@ 2010-09-23 21:22 ` Joel Becker
0 siblings, 0 replies; 2+ messages in thread
From: Joel Becker @ 2010-09-23 21:22 UTC (permalink / raw)
To: ocfs2-devel
On Mon, Sep 13, 2010 at 02:00:23PM +0800, Tao Ma wrote:
> 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>
This patch is now in the 'fixes' branch of ocfs2.git.
Joel
--
"I'm drifting and drifting
Just like a ship out on the sea.
Cause I ain't got nobody, baby,
In this world to care for me."
Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-23 21:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-13 6:00 [Ocfs2-devel] [PATCH] ocfs2: update ctime when changing the file's permission by setfacl Tao Ma
2010-09-23 21:22 ` Joel Becker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).