Skip to content

Commit d14035b

Browse files
author
Rafael Aquini
committed
shmem: convert to simple_rename_timestamp
JIRA: https://issues.redhat.com/browse/RHEL-27743 This patch is a backport of the following upstream commit: commit 944d0d9 Author: Jeff Layton <[email protected]> Date: Wed Jul 5 15:00:36 2023 -0400 shmem: 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 <[email protected]> Reviewed-by: Jan Kara <[email protected]> Message-Id: <[email protected]> Signed-off-by: Christian Brauner <[email protected]> Signed-off-by: Rafael Aquini <[email protected]>
1 parent 7ca132f commit d14035b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mm/shmem.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3402,9 +3402,7 @@ static int shmem_rename2(struct user_namespace *mnt_userns,
34023402

34033403
old_dir->i_size -= BOGO_DIRENT_SIZE;
34043404
new_dir->i_size += BOGO_DIRENT_SIZE;
3405-
old_dir->i_ctime = old_dir->i_mtime =
3406-
new_dir->i_ctime = new_dir->i_mtime =
3407-
inode->i_ctime = current_time(old_dir);
3405+
simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry);
34083406
inode_inc_iversion(old_dir);
34093407
inode_inc_iversion(new_dir);
34103408
return 0;

0 commit comments

Comments
 (0)