devtmpfs regression fix: reconfigure on each mount
authorNeilBrown <neilb@suse.de>
Sun, 16 Jan 2022 22:07:26 +0000 (09:07 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jan 2022 08:17:49 +0000 (09:17 +0100)
commit0084fefe2960b3a0c6482558272ee6372c75e3d4
treeabd9f1f3b1e9821d8b0c81f268b4e0363cfa73ef
parentee40594c95ae5a729d0c0685ce6e45505431be8d
devtmpfs regression fix: reconfigure on each mount

commit a6097180d884ddab769fb25588ea8598589c218c upstream.

Prior to Linux v5.4 devtmpfs used mount_single() which treats the given
mount options as "remount" options, so it updates the configuration of
the single super_block on each mount.

Since that was changed, the mount options used for devtmpfs are ignored.
This is a regression which affect systemd - which mounts devtmpfs with
"-o mode=755,size=4m,nr_inodes=1m".

This patch restores the "remount" effect by calling reconfigure_single()

Fixes: d401727ea0d7 ("devtmpfs: don't mix {ramfs,shmem}_fill_super() with mount_single()")
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/devtmpfs.c
fs/super.c
include/linux/fs_context.h