mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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: Vasiliy Kulikov <[email protected]> Reported-by: Arkadiusz Miskiewicz <[email protected]> Tested-by: Arkadiusz Miskiewicz <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Al Viro <[email protected]> Cc: Valdis Kletnieks <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
10bdfb5ef7
commit
99663be772
1 changed files with 5 additions and 4 deletions
|
|
@ -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)) {
|
||||
deactivate_locked_super(sb);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
if (!sb->s_root) {
|
||||
sb->s_flags = flags;
|
||||
if (!proc_parse_options(options, ns)) {
|
||||
deactivate_locked_super(sb);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
err = proc_fill_super(sb);
|
||||
if (err) {
|
||||
deactivate_locked_super(sb);
|
||||
|
|
|
|||
Loading…
Reference in a new issue