aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuezhang Mo <[email protected]>2022-11-10 17:38:16 +0800
committerNamjae Jeon <[email protected]>2024-03-19 20:56:10 +0900
commitdc38fdc51ba650871f12e4032bfe170f5b0e8ed0 (patch)
tree50c97f2830bce22d46993567d40b9b0dd338b549
parent96cf51acccb64d24339822824c262a1d3744d218 (diff)
exfat: remove duplicate update parent dir
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]> Reviewed-by: Sungjong Seo <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
-rw-r--r--fs/exfat/namei.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c
index b33497845a06..631ad9e8e32a 100644
--- a/fs/exfat/namei.c
+++ b/fs/exfat/namei.c
@@ -1281,7 +1281,8 @@ static int exfat_rename(struct mnt_idmap *idmap,
}
inode_inc_iversion(old_dir);
- mark_inode_dirty(old_dir);
+ if (new_dir != old_dir)
+ mark_inode_dirty(old_dir);
if (new_inode) {
exfat_unhash_inode(new_inode);