From: Ian Kent <raven@themaw.net>
To: Jeff Layton <jlayton@kernel.org>,
Christian Brauner <brauner@kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Brad Warrum <bwarrum@linux.ibm.com>,
Ritu Agarwal <rituagar@linux.ibm.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Tigran A. Aivazian" <aivazian.tigran@gmail.com>,
Jeremy Kerr <jk@ozlabs.org>, Ard Biesheuvel <ardb@kernel.org>,
Namjae Jeon <linkinjeon@kernel.org>,
Sungjong Seo <sj1557.seo@samsung.com>,
Steve French <sfrench@samba.org>,
Paulo Alcantara <pc@manguebit.com>,
Ronnie Sahlberg <lsahlber@redhat.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Tom Talpey <tom@talpey.com>,
John Johansen <john.johansen@canonical.com>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
Ruihan Li <lrh2000@pku.edu.cn>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Alan Stern <stern@rowland.harvard.edu>,
Suren Baghdasaryan <surenb@google.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
autofs@vger.kernel.org, linux-efi@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org,
samba-technical@lists.samba.org, apparmor@lists.ubuntu.com,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH v2 3/8] autofs: set ctime as well when mtime changes on a dir
Date: Tue, 13 Jun 2023 15:16:04 +0800 [thread overview]
Message-ID: <39c762dd-37a9-8ef8-9002-c1eb367946d3@themaw.net> (raw)
In-Reply-To: <20230612104524.17058-4-jlayton@kernel.org>
On 12/6/23 18:45, Jeff Layton wrote:
> When adding entries to a directory, POSIX generally requires that the
> ctime also be updated alongside the mtime.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Ian Kent <raven@themaw.net>
> ---
> fs/autofs/root.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/autofs/root.c b/fs/autofs/root.c
> index 6baf90b08e0e..93046c9dc461 100644
> --- a/fs/autofs/root.c
> +++ b/fs/autofs/root.c
> @@ -600,7 +600,7 @@ static int autofs_dir_symlink(struct mnt_idmap *idmap,
> p_ino = autofs_dentry_ino(dentry->d_parent);
> p_ino->count++;
>
> - dir->i_mtime = current_time(dir);
> + dir->i_mtime = dir->i_ctime = current_time(dir);
>
> return 0;
> }
> @@ -633,7 +633,7 @@ static int autofs_dir_unlink(struct inode *dir, struct dentry *dentry)
> d_inode(dentry)->i_size = 0;
> clear_nlink(d_inode(dentry));
>
> - dir->i_mtime = current_time(dir);
> + dir->i_mtime = dir->i_ctime = current_time(dir);
>
> spin_lock(&sbi->lookup_lock);
> __autofs_add_expiring(dentry);
> @@ -749,7 +749,7 @@ static int autofs_dir_mkdir(struct mnt_idmap *idmap,
> p_ino = autofs_dentry_ino(dentry->d_parent);
> p_ino->count++;
> inc_nlink(dir);
> - dir->i_mtime = current_time(dir);
> + dir->i_mtime = dir->i_ctime = current_time(dir);
>
> return 0;
> }
next prev parent reply other threads:[~2023-06-13 7:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 10:45 [PATCH v2 0/8] fs: add some missing ctime updates Jeff Layton
2023-06-12 10:45 ` [PATCH v2 1/8] ibmvmc: update ctime in conjunction with mtime on write Jeff Layton
2023-06-12 10:45 ` [PATCH v2 2/8] usb: update the ctime as well when updating mtime after an ioctl Jeff Layton
2023-06-12 10:45 ` [PATCH v2 3/8] autofs: set ctime as well when mtime changes on a dir Jeff Layton
2023-06-13 7:16 ` Ian Kent [this message]
2023-06-14 8:30 ` (subset) " Christian Brauner
2023-06-15 10:14 ` Ian Kent
2023-06-12 10:45 ` [PATCH v2 4/8] bfs: update ctime in addition to mtime when adding entries Jeff Layton
2023-06-12 10:45 ` [PATCH v2 5/8] efivarfs: update ctime when mtime changes on a write Jeff Layton
2023-06-12 10:45 ` [PATCH v2 6/8] exfat: ensure that ctime is updated whenever the mtime is Jeff Layton
2023-06-12 10:45 ` [PATCH v2 7/8] apparmor: update ctime whenever the mtime changes on an inode Jeff Layton
2023-06-12 10:45 ` [PATCH v2 8/8] cifs: update the ctime on a partial page write Jeff Layton
2023-06-12 13:41 ` Tom Talpey
2023-06-12 13:51 ` Jeff Layton
2023-08-30 0:08 ` [PATCH v2 0/8] fs: add some missing ctime updates 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=39c762dd-37a9-8ef8-9002-c1eb367946d3@themaw.net \
--to=raven@themaw.net \
--cc=aivazian.tigran@gmail.com \
--cc=apparmor@lists.ubuntu.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=autofs@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=bwarrum@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jk@ozlabs.org \
--cc=jlayton@kernel.org \
--cc=jmorris@namei.org \
--cc=john.johansen@canonical.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lrh2000@pku.edu.cn \
--cc=lsahlber@redhat.com \
--cc=paul@paul-moore.com \
--cc=pc@manguebit.com \
--cc=rituagar@linux.ibm.com \
--cc=samba-technical@lists.samba.org \
--cc=sebastian.reichel@collabora.com \
--cc=serge@hallyn.com \
--cc=sfrench@samba.org \
--cc=sj1557.seo@samsung.com \
--cc=sprasad@microsoft.com \
--cc=stern@rowland.harvard.edu \
--cc=surenb@google.com \
--cc=tom@talpey.com \
--cc=viro@zeniv.linux.org.uk \
--cc=wsa+renesas@sang-engineering.com \
/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