]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
jffs2: Fix ignoring mounting options problem during remounting
authorlizhe <lizhe67@huawei.com>
Wed, 14 Oct 2020 06:54:42 +0000 (14:54 +0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 4 Jan 2021 15:47:58 +0000 (16:47 +0100)
commitbc233e63a059b2aa904ef2bbbdd4b11e8dce1b3a
tree089c18bb2c4b1daa7e0f3bdb661af647a372af48
parente4e135f85940153f3413c076e9768b1e9482cec3
jffs2: Fix ignoring mounting options problem during remounting

BugLink: https://bugs.launchpad.net/bugs/1910111
commit 08cd274f9b8283a1da93e2ccab216a336da83525 upstream.

The jffs2 mount options will be ignored when remounting jffs2.
It can be easily reproduced with the steps listed below.
1. mount -t jffs2 -o compr=none /dev/mtdblockx /mnt
2. mount -o remount compr=zlib /mnt

Since ec10a24f10c8, the option parsing happens before fill_super and
then pass fc, which contains the options parsing results, to function
jffs2_reconfigure during remounting. But function jffs2_reconfigure do
not update c->mount_opts.

This patch add a function jffs2_update_mount_opts to fix this problem.

By the way, I notice that tmpfs use the same way to update remounting
options. If it is necessary to unify them?

Cc: <stable@vger.kernel.org>
Fixes: ec10a24f10c8 ("vfs: Convert jffs2 to use the new mount API")
Signed-off-by: lizhe <lizhe67@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/jffs2/super.c