Skip to content

Commit

Permalink
exfat: remove duplicate update parent dir
Browse files Browse the repository at this point in the history
For renaming, the directory only needs to be updated once if it
is in the same directory.

Signed-off-by: Yuezhang Mo <[email protected]>
Reviewed-by: Andy Wu <[email protected]>
Reviewed-by: Aoyama Wataru <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
YuezhangMo authored and namjaejeon committed Dec 29, 2023
1 parent 8fce2c5 commit ea849cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,8 @@ static int exfat_rename(struct user_namespace *mnt_userns,
#if LINUX_VERSION_CODE <= KERNEL_VERSION(6, 6, 0)
old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir);
#endif
mark_inode_dirty(old_dir);
if (new_dir != old_dir)
mark_inode_dirty(old_dir);

if (new_inode) {
exfat_unhash_inode(new_inode);
Expand Down

0 comments on commit ea849cf

Please sign in to comment.