From: Yuezhang Mo Date: Thu, 10 Nov 2022 09:38:16 +0000 (+0800) Subject: exfat: remove duplicate update parent dir X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=dc38fdc51ba650871f12e4032bfe170f5b0e8ed0;p=users%2Fjedix%2Flinux-maple.git 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 Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon --- 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);