From: Jeff Layton <jlayton@kernel.org>
To: Hungyu Lin <dennylin0707@gmail.com>, linkinjeon@kernel.org
Cc: sj1557.seo@samsung.com, yuezhang.mo@sony.com,
exfat@lists.linux.dev, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, jack@suse.cz
Subject: Re: [PATCH] exfat: preserve creation times during rename
Date: Tue, 27 Oct 2026 06:44:35 -0400 [thread overview]
Message-ID: <54dd1452c761cbeb9555b6ef5c8411aab0ac8001.camel@kernel.org> (raw)
In-Reply-To: <20261027091353.74642-1-dennylin0707@gmail.com>
On Tue, 2026-10-27 at 09:13 +0000, Hungyu Lin wrote:
> exfat_rename() resets the destination parent directory's i_crtime after
> every successful rename. A normal mv within that directory therefore
> changes its STATX_BTIME, and the new creation time is also written to
> disk. Moving a child does not recreate its parent directory.
>
> The function also resets i_crtime on an overwritten target inode. An
> application holding an open file descriptor can observe its birth time
> change even though it still refers to the same inode.
>
> Remove both creation-time updates. simple_rename_timestamp() already
> updates the modification and change times required by rename, while
> creation times should remain unchanged. Jeff Layton questioned these
> updates during the timestamp accessor conversion, but they remain in
> the current implementation.
>
> Fixes: 5f2aa075070c ("exfat: add inode operations")
> Suggested-by: Jeff Layton <jlayton@kernel.org>
> Link: https://lore.kernel.org/r/bb698e294b0d4dbbbad4b94048693360010b8010.camel@kernel.org
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> fs/exfat/namei.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c
> index 68ddb9c5504f..d01280570f70 100644
> --- a/fs/exfat/namei.c
> +++ b/fs/exfat/namei.c
> @@ -1293,7 +1293,6 @@ static int exfat_rename(const struct mnt_idmap *idmap,
>
> inode_inc_iversion(new_dir);
> simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry);
> - EXFAT_I(new_dir)->i_crtime = current_time(new_dir);
> exfat_truncate_inode_atime(new_dir);
> if (IS_DIRSYNC(new_dir) && size != i_size_read(new_dir))
> exfat_sync_inode(new_dir);
> @@ -1331,7 +1330,6 @@ static int exfat_rename(const struct mnt_idmap *idmap,
> exfat_warn(sb, "abnormal access to an inode dropped");
> WARN_ON(new_inode->i_nlink == 0);
> }
> - EXFAT_I(new_inode)->i_crtime = current_time(new_inode);
> }
>
> unlock:
To be clear, i_crtime is equivalent to the btime, so it shouldn't
change on a rename.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2026-10-27 10:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 9:13 Hungyu Lin
2026-10-27 10:44 ` Jeff Layton [this message]
2026-10-27 22:15 ` Namjae Jeon
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=54dd1452c761cbeb9555b6ef5c8411aab0ac8001.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=dennylin0707@gmail.com \
--cc=exfat@lists.linux.dev \
--cc=jack@suse.cz \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
--cc=yuezhang.mo@sony.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
all inboxes | Powered by JetHome®