Commit 99663be7 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Linus Torvalds

proc: fix mount -t proc -o AAA

The proc_parse_options() call from proc_mount() runs only once at boot
time.  So on any later mount attempt, any mount options are ignored
because ->s_root is already initialized.

As a consequence, "mount -o <options>" will ignore the options.  The
only way to change mount options is "mount -o remount,<options>".

To fix this, parse the mount options unconditionally.
Signed-off-by: default avatarVasiliy Kulikov <>
Reported-by: default avatarArkadiusz Miskiewicz <>
Tested-by: default avatarArkadiusz Miskiewicz <>
Cc: Alexey Dobriyan <>
Cc: Al Viro <>
Cc: Valdis Kletnieks <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 10bdfb5e
......@@ -115,12 +115,13 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
if (IS_ERR(sb))
return ERR_CAST(sb);
if (!proc_parse_options(options, ns)) {
return ERR_PTR(-EINVAL);
if (!sb->s_root) {
sb->s_flags = flags;
if (!proc_parse_options(options, ns)) {
return ERR_PTR(-EINVAL);
err = proc_fill_super(sb);
if (err) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment