From: Jan Kara <jack@suse.cz>
To: linux-fsdevel@vger.kernel.org
Cc: David Woodhouse <dwmw2@infradead.org>,
Al Viro <viro@zeniv.linux.org.uk>, Theodore Ts'o <tytso@mit.edu>,
linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: [PATCH 3/4] ext4: update ctime when changing the file's permission by setfacl
Date: Fri, 4 Jun 2010 17:07:54 +0200 [thread overview]
Message-ID: <1275664075-4703-4-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1275664075-4703-1-git-send-email-jack@suse.cz>
ext4 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, ext4 must update it.
Port of ext3 patch by Miao Xie <miaox@cn.fujitsu.com>.
CC: linux-ext4@vger.kernel.org
CC: tytso@mit.edu
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/ext4/acl.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c
index feaf498..5e2ed45 100644
--- a/fs/ext4/acl.c
+++ b/fs/ext4/acl.c
@@ -204,6 +204,7 @@ ext4_set_acl(handle_t *handle, struct inode *inode, int type,
return error;
else {
inode->i_mode = mode;
+ inode->i_ctime = ext4_current_time(inode);
ext4_mark_inode_dirty(handle, inode);
if (error == 0)
acl = NULL;
--
1.6.4.2
next prev parent reply other threads:[~2010-06-04 15:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 15:07 [PATCH 0/4] Update ctime when changing the file's permission by setfacl Jan Kara
2010-06-04 15:07 ` [PATCH 1/4] ext2: update " Jan Kara
2010-06-04 15:07 ` [PATCH 2/4] vfs: " Jan Kara
2010-06-04 15:07 ` Jan Kara [this message]
2010-06-15 16:21 ` [PATCH 3/4] ext4: " tytso
2010-06-04 15:07 ` [PATCH 4/4] jffs2: " Jan Kara
2010-06-04 15:14 ` David Woodhouse
2010-06-04 18:32 ` Al Viro
2010-06-04 18:37 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1275664075-4703-4-git-send-email-jack@suse.cz \
--to=jack@suse.cz \
--cc=dwmw2@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).