]> git.itanic.dy.fi Git - linux-stable/commit
devtmpfs regression fix: reconfigure on each mount
authorNeilBrown <neilb@suse.de>
Sun, 16 Jan 2022 22:07:26 +0000 (09:07 +1100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 17 Jan 2022 07:40:29 +0000 (09:40 +0200)
commita6097180d884ddab769fb25588ea8598589c218c
treeb306cc18579ec7aa978780bade0ade6da1cf801d
parent3c750c7b614322a4ab50be0d57a76addb598d51d
devtmpfs regression fix: reconfigure on each mount

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>
drivers/base/devtmpfs.c
fs/super.c
include/linux/fs_context.h