[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211026114043.q5kwobv7vlnv2uej@andromeda.lan>
Date: Tue, 26 Oct 2021 13:40:43 +0200
From: Carlos Maiolino <cmaiolino@...hat.com>
To: Lukas Czerner <lczerner@...hat.com>
Cc: linux-ext4@...r.kernel.org, tytso@....edu,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v3 11/13] ext4: change token2str() to use ext4_param_specs
On Thu, Oct 21, 2021 at 01:45:06PM +0200, Lukas Czerner wrote:
> Chage token2str() to use ext4_param_specs instead of tokens so that we
^ Change.
> can get rid of tokens entirely.
If you're removing tokens entirely, maybe the name token2str() doesn't make
sense anymore?
>
> Signed-off-by: Lukas Czerner <lczerner@...hat.com>
> ---
> fs/ext4/super.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index bdcaa158eab8..0ccd47f3fa91 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -3037,12 +3037,12 @@ static inline void ext4_show_quota_options(struct seq_file *seq,
>
> static const char *token2str(int token)
> {
> - const struct match_token *t;
> + const struct fs_parameter_spec *spec;
>
> - for (t = tokens; t->token != Opt_err; t++)
> - if (t->token == token && !strchr(t->pattern, '='))
> + for (spec = ext4_param_specs; spec->name != NULL; spec++)
> + if (spec->opt == token && !spec->type)
> break;
> - return t->pattern;
> + return spec->name;
> }
>
> /*
> --
> 2.31.1
>
--
Carlos
Powered by blists - more mailing lists