Re: [PATCH] debugfs: ignore auto and noauto options if given

From: Christian Brauner
Date: Mon May 27 2024 - 08:20:37 EST


On Mon, May 27, 2024 at 12:06:18PM +0200, Wolfram Sang wrote:
> Hi Christian,
>
> > Afaict, the "auto" option has either never existent or it was removed before
> > the new mount api conversion time ago for debugfs.
>
> Frankly, I have no idea why I put this 'auto' in my fstab ages ago. But
> it seems, I am not the only one[1].
>
> [1] https://www.ibm.com/docs/en/linux-on-systems?topic=assumptions-debugfs
>
> > diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
> > index dc51df0b118d..713b6f76e75d 100644
> > --- a/fs/debugfs/inode.c
> > +++ b/fs/debugfs/inode.c
> > @@ -107,8 +107,16 @@ static int debugfs_parse_param(struct fs_context *fc, struct fs_parameter *param
> > int opt;
> >
> > opt = fs_parse(fc, debugfs_param_specs, param, &result);
> > - if (opt < 0)
> > + if (opt < 0) {
> > + /*
> > + * We might like to report bad mount options here; but
> > + * traditionally debugfs has ignored all mount options
> > + */
> > + if (opt == -ENOPARAM)
> > + return 0;
> > +
> > return opt;
> > + }
> >
> > switch (opt) {
> > case Opt_uid:
> >
> >
> > Does that fix it for you?
>
> Yes, it does, thank you.
>
> Reported-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> Tested-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Thanks, applied. Should be fixed by end of the week.