diff mbox series

cifs: ignore auto and noauto options if given

Message ID 20210127214434.3882-1-adam@adamharvey.name (mailing list archive)
State New, archived
Headers show
Series cifs: ignore auto and noauto options if given | expand

Commit Message

Adam Harvey Jan. 27, 2021, 9:44 p.m. UTC
In 24e0a1eff9e2, the noauto and auto options were missed when migrating
to the new mount API. As a result, users with noauto in their fstab
mount options are now unable to mount cifs filesystems, as they'll
receive an "Unknown parameter" error.

This restores the old behaviour of ignoring noauto and auto if they're
given.

Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
Signed-off-by: Adam Harvey <adam@adamharvey.name>
---
 fs/cifs/fs_context.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Steve French Jan. 27, 2021, 11:18 p.m. UTC | #1
The patch looks harmless, but am curious if other people can repro
this.  I tried it on 5.11-rc4 (cifs-utils version 6.11).  I tried it
with and without the mount helper (mount.cifs).  I couldn't get it to
fail with 'noauto'

Anyone else able to repro the problem?

On Wed, Jan 27, 2021 at 3:44 PM Adam Harvey <adam@adamharvey.name> wrote:
>
> In 24e0a1eff9e2, the noauto and auto options were missed when migrating
> to the new mount API. As a result, users with noauto in their fstab
> mount options are now unable to mount cifs filesystems, as they'll
> receive an "Unknown parameter" error.
>
> This restores the old behaviour of ignoring noauto and auto if they're
> given.
>
> Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
> Signed-off-by: Adam Harvey <adam@adamharvey.name>
> ---
>  fs/cifs/fs_context.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
> index 076bcadc756a..62818b142e2e 100644
> --- a/fs/cifs/fs_context.c
> +++ b/fs/cifs/fs_context.c
> @@ -175,6 +175,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
>         fsparam_flag_no("exec", Opt_ignore),
>         fsparam_flag_no("dev", Opt_ignore),
>         fsparam_flag_no("mand", Opt_ignore),
> +       fsparam_flag_no("auto", Opt_ignore),
>         fsparam_string("cred", Opt_ignore),
>         fsparam_string("credentials", Opt_ignore),
>         {}
> --
> 2.30.0
>
ronnie sahlberg Jan. 27, 2021, 11:25 p.m. UTC | #2
On Thu, Jan 28, 2021 at 9:19 AM Steve French via samba-technical
<samba-technical@lists.samba.org> wrote:
>
> The patch looks harmless, but am curious if other people can repro
> this.  I tried it on 5.11-rc4 (cifs-utils version 6.11).  I tried it
> with and without the mount helper (mount.cifs).  I couldn't get it to
> fail with 'noauto'
>
> Anyone else able to repro the problem?
>
> On Wed, Jan 27, 2021 at 3:44 PM Adam Harvey <adam@adamharvey.name> wrote:
> >
> > In 24e0a1eff9e2, the noauto and auto options were missed when migrating
> > to the new mount API. As a result, users with noauto in their fstab
> > mount options are now unable to mount cifs filesystems, as they'll
> > receive an "Unknown parameter" error.
> >
> > This restores the old behaviour of ignoring noauto and auto if they're
> > given.
> >
> > Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
> > Signed-off-by: Adam Harvey <adam@adamharvey.name>
> > ---
> >  fs/cifs/fs_context.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
> > index 076bcadc756a..62818b142e2e 100644
> > --- a/fs/cifs/fs_context.c
> > +++ b/fs/cifs/fs_context.c
> > @@ -175,6 +175,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
> >         fsparam_flag_no("exec", Opt_ignore),
> >         fsparam_flag_no("dev", Opt_ignore),
> >         fsparam_flag_no("mand", Opt_ignore),
> > +       fsparam_flag_no("auto", Opt_ignore),
> >         fsparam_string("cred", Opt_ignore),
> >         fsparam_string("credentials", Opt_ignore),
> >         {}

We probably also want to add
fsparam_string("prefixpath", Opt_ignore),

> > --
> > 2.30.0
> >
>
>
> --
> Thanks,
>
> Steve
>
Steve French Jan. 28, 2021, 1:25 a.m. UTC | #3
Merged into cifs-2.6.git (seems harmless, and probably slightly safer
to include this - even though currently I can't reproduce the reported
problem).

Let me know if anyone else has been able to reproduce it - even with
Adam's suggested /etc/fstab line, I wasn't able to repro it.

On Wed, Jan 27, 2021 at 3:44 PM Adam Harvey <adam@adamharvey.name> wrote:
>
> In 24e0a1eff9e2, the noauto and auto options were missed when migrating
> to the new mount API. As a result, users with noauto in their fstab
> mount options are now unable to mount cifs filesystems, as they'll
> receive an "Unknown parameter" error.
>
> This restores the old behaviour of ignoring noauto and auto if they're
> given.
>
> Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
> Signed-off-by: Adam Harvey <adam@adamharvey.name>
> ---
>  fs/cifs/fs_context.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
> index 076bcadc756a..62818b142e2e 100644
> --- a/fs/cifs/fs_context.c
> +++ b/fs/cifs/fs_context.c
> @@ -175,6 +175,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
>         fsparam_flag_no("exec", Opt_ignore),
>         fsparam_flag_no("dev", Opt_ignore),
>         fsparam_flag_no("mand", Opt_ignore),
> +       fsparam_flag_no("auto", Opt_ignore),
>         fsparam_string("cred", Opt_ignore),
>         fsparam_string("credentials", Opt_ignore),
>         {}
> --
> 2.30.0
>
diff mbox series

Patch

diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 076bcadc756a..62818b142e2e 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -175,6 +175,7 @@  const struct fs_parameter_spec smb3_fs_parameters[] = {
 	fsparam_flag_no("exec", Opt_ignore),
 	fsparam_flag_no("dev", Opt_ignore),
 	fsparam_flag_no("mand", Opt_ignore),
+	fsparam_flag_no("auto", Opt_ignore),
 	fsparam_string("cred", Opt_ignore),
 	fsparam_string("credentials", Opt_ignore),
 	{}