Re: [PATCH] exfat: clear the volume dirty flag only when remounting read-only

From: Chi Zhiling

Date: Thu Sep 03 2026 - 21:47:26 EST


On 9/4/26 7:28 AM, Namjae Jeon wrote:
diff --git a/fs/exfat/super.c b/fs/exfat/super.c
index a9ea36ba2693..268732571837 100644
--- a/fs/exfat/super.c
+++ b/fs/exfat/super.c
@@ -775,9 +775,12 @@ static int exfat_reconfigure(struct fs_context *fc)
fc->sb_flags |= SB_NODIRATIME;

sync_filesystem(sb);
- mutex_lock(&sbi->s_lock);
- exfat_clear_volume_dirty(sb);
- mutex_unlock(&sbi->s_lock);
+
+ if ((fc->sb_flags & (SB_FORCE | SB_RDONLY)) == SB_RDONLY) {
Could we also add !sb_rdonly(sb) here?
if ((fc->sb_flags & (SB_FORCE | SB_RDONLY)) == SB_RDONLY &&
!sb_rdonly(sb))

Yes, this way we do not call exfat_clear_volume_dirty() when remounting from RO to RO. I will update it in v2.

Thanks.