[PATCH v2 19/34] ocfs2: keep the current mount options on remount
Joseph Qi
joseph.qi at linux.alibaba.com
Tue Nov 10 17:31:01 PST 2026
On 11/11/26 5:52 AM, Christian Brauner wrote:
> On Fri, Oct 30, 2026 at 10:58:52AM +0800, Joseph Qi wrote:
>> ocfs2_reconfigure() decides the transition from fc->sb_flags alone without
>> sb_flags_mask test, unlike reconfigure_super(). And fspick() passes
>> fs_context_for_reconfigure(target.dentry, 0, 0). So on a read-only mount:
>
>> So it seems we should test sb_flags_mask as well?
>
> No, that's a generic bug. I fixed that in reconfigure_super() with
> "super: keep the read-only state if a reconfiguration doesn't change it".
> That is in vfs-7.5.super (cf. [1]). This series depends on that work.
>
> If SB_RDONLY isn't in sb_flags_mask it fills in the current read-only
> state. So ocfs2_reconfigure() sees SB_RDONLY and stays read-only. ocfs2
> is one of the 23 filesystems listed there that only look at
> fc->sb_flags.
>
Now it looks fine.
Reviewed-by: Joseph Qi <joseph.qi at linux.alibaba.com>
>> The same falls out of a legacy remount whose flags omit MS_RDONLY.
>
> No, do_remount() always passes MS_RMT_MASK which includes MS_RDONLY. A
> remount without MS_RDONLY asks for read-write.
>
> Thanks for the review!
>
> [1]: https://lore.kernel.org/r/20261011-work-super-fixes-core-v1-11-c727176c5b53@kernel.org
More information about the linux-mtd
mailing list