Messages in this thread | | | From | David Howells <> | Subject | Re: Inverted mount options completely broken (iversion,relatime) | Date | Wed, 29 Jul 2020 21:36:56 +0100 |
| |
Josef Bacik <josef@toxicpanda.com> wrote:
> So my question is, what do we do here?
Hmmm... As the code stands, MS_RDONLY, MS_SYNCHRONOUS, MS_MANDLOCK, MS_I_VERSION and MS_LAZYTIME should all be masked off before the new flags are set if called from mount(2) rather than fsconfig(2).
do_remount() gives MS_RMT_MASK to fs_context_for_reconfigure() to load into fc->sb_flags_mask, which should achieve the desired effect in reconfigure_super() on this line:
WRITE_ONCE(sb->s_flags, ((sb->s_flags & ~fc->sb_flags_mask) | (fc->sb_flags & fc->sb_flags_mask)));
David
| |