Skip to content

Commit 944d0d9

Browse files
jtlaytonbrauner
authored andcommitted
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]>
1 parent e54c86f commit 944d0d9

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
@@ -3266,9 +3266,7 @@ static int shmem_rename2(struct mnt_idmap *idmap,
32663266

32673267
old_dir->i_size -= BOGO_DIRENT_SIZE;
32683268
new_dir->i_size += BOGO_DIRENT_SIZE;
3269-
old_dir->i_ctime = old_dir->i_mtime =
3270-
new_dir->i_ctime = new_dir->i_mtime =
3271-
inode->i_ctime = current_time(old_dir);
3269+
simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry);
32723270
inode_inc_iversion(old_dir);
32733271
inode_inc_iversion(new_dir);
32743272
return 0;

0 commit comments

Comments
 (0)