Skip to contentSkip to conversation

exfat: remove duplicate update parent dir

PATCH New [email protected] 1 participant 1 message Dec 11, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 11/11 exfat: remove duplicate update parent dir

From: Yuezhang Mo <[email protected]>

For renaming, the directory only needs to be updated once if it is in the same directory.

---
 fs/exfat/namei.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/exfat/namei.c +2 -1
index b33497845a06..631ad9e8e32a 100644
@@ -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);
Signature · 1 line
2.25.1