mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
ntfs3: 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-11-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
d06cdfddd1
commit
487e34fc9f
@ -324,14 +324,11 @@ static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir,
|
||||
/* Restore after failed rename failed too. */
|
||||
_ntfs_bad_inode(inode);
|
||||
} else if (!err) {
|
||||
inode->i_ctime = dir->i_ctime = dir->i_mtime =
|
||||
current_time(dir);
|
||||
simple_rename_timestamp(dir, dentry, new_dir, new_dentry);
|
||||
mark_inode_dirty(inode);
|
||||
mark_inode_dirty(dir);
|
||||
if (dir != new_dir) {
|
||||
new_dir->i_mtime = new_dir->i_ctime = dir->i_ctime;
|
||||
if (dir != new_dir)
|
||||
mark_inode_dirty(new_dir);
|
||||
}
|
||||
|
||||
if (IS_DIRSYNC(dir))
|
||||
ntfs_sync_inode(dir);
|
||||
|
Loading…
Reference in New Issue
Block a user