Re: [PATCH] f2fs: update inode ctime on exchange rename

From: Chao Yu

Date: Sun Nov 01 2026 - 21:41:48 EST


On 11/2/26 08:47, Hungyu Lin wrote:
When two regular files are exchanged with renameat2(RENAME_EXCHANGE),
their ctimes remain unchanged. f2fs_cross_rename() applies its explicit
ctime updates and dirty marking to old_dir and new_dir, which have
already been updated by f2fs_set_link().

Update old_inode and new_inode instead, matching the ordinary rename
path. Keep the existing parent link-count handling, which dirties the
parents through f2fs_i_links_write().


Cc: stable@xxxxxxxxxxxxxxx

Fixes: 32f9bc25cbda ("f2fs: support ->rename2()")
Signed-off-by: Hungyu Lin <dennylin0707@xxxxxxxxx>

Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,