diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-07-05 21:00:36 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-07-10 10:08:16 +0200 |
commit | 944d0d9def9de37f0209ff73f3d8daa1baccab67 (patch) | |
tree | 952a7d6c1fb3713e49394eb313f3d695d4a7c0c6 | |
parent | ubifs: convert to simple_rename_timestamp (diff) | |
download | linux-944d0d9def9de37f0209ff73f3d8daa1baccab67.tar.xz linux-944d0d9def9de37f0209ff73f3d8daa1baccab67.zip |
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 <jlayton@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-Id: <20230705190309.579783-9-jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r-- | mm/shmem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 2f2e0e618072..a7dfbd221a25 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3266,9 +3266,7 @@ static int shmem_rename2(struct mnt_idmap *idmap, old_dir->i_size -= BOGO_DIRENT_SIZE; new_dir->i_size += BOGO_DIRENT_SIZE; - old_dir->i_ctime = old_dir->i_mtime = - new_dir->i_ctime = new_dir->i_mtime = - inode->i_ctime = current_time(old_dir); + simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry); inode_inc_iversion(old_dir); inode_inc_iversion(new_dir); return 0; |