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 4/4] jffs2: update ctime when changing the file's permission by setfacl
Date: Fri, 4 Jun 2010 17:07:55 +0200 [thread overview]
Message-ID: <1275664075-4703-5-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1275664075-4703-1-git-send-email-jack@suse.cz>
jffs2 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, jffs2 must update it.
Port of ext3 patch by Miao Xie <miaox@cn.fujitsu.com>.
CC: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/jffs2/acl.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index a33aab6..54a92fd 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -234,8 +234,9 @@ static int jffs2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
if (inode->i_mode != mode) {
struct iattr attr;
- attr.ia_valid = ATTR_MODE;
+ attr.ia_valid = ATTR_MODE | ATTR_CTIME;
attr.ia_mode = mode;
+ attr.ia_ctime = CURRENT_TIME_SEC;
rc = jffs2_do_setattr(inode, &attr);
if (rc < 0)
return rc;
--
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 ` [PATCH 3/4] ext4: " Jan Kara
2010-06-15 16:21 ` tytso
2010-06-04 15:07 ` Jan Kara [this message]
2010-06-04 15:14 ` [PATCH 4/4] jffs2: " 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-5-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).