summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-07-05 15:00:37 -0400
committerChristian Brauner <brauner@kernel.org>2023-07-10 10:08:16 +0200
commitd06cdfddd1d1483c78b60c64d110ae2218b37a0c (patch)
tree677f5d1e9849b9b791da7f28437a54b1277d5009 /fs
parent944d0d9def9de37f0209ff73f3d8daa1baccab67 (diff)
exfat: convert to simple_rename_timestamp
A rename potentially involves updating 4 different inode timestamps. Convert to the new simple_rename_timestamp helper function. Signed-off-by: Jeff Layton <jlayton@kernel.org> Message-Id: <20230705190309.579783-10-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/exfat/namei.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c
index d9b46fa36bff..e91022ff80ef 100644
--- a/fs/exfat/namei.c
+++ b/fs/exfat/namei.c
@@ -1312,8 +1312,8 @@ static int exfat_rename(struct mnt_idmap *idmap,
goto unlock;
inode_inc_iversion(new_dir);
- new_dir->i_ctime = new_dir->i_mtime = new_dir->i_atime =
- EXFAT_I(new_dir)->i_crtime = current_time(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_atime(&new_dir->i_atime);
if (IS_DIRSYNC(new_dir))
exfat_sync_inode(new_dir);
@@ -1336,7 +1336,6 @@ static int exfat_rename(struct mnt_idmap *idmap,
}
inode_inc_iversion(old_dir);
- old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir);
if (IS_DIRSYNC(old_dir))
exfat_sync_inode(old_dir);
else