Commit 97d8a670 authored by Lukas Czerner's avatar Lukas Czerner Committed by Theodore Ts'o
Browse files

ext4: change token2str() to use ext4_param_specs



Change token2str() to use ext4_param_specs instead of tokens so that we
can get rid of tokens entirely.

Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
Link: https://lore.kernel.org/r/20211027141857.33657-12-lczerner@redhat.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 02f960f8
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -3046,12 +3046,12 @@ static inline void ext4_show_quota_options(struct seq_file *seq,


static const char *token2str(int token)
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++)
	for (spec = ext4_param_specs; spec->name != NULL; spec++)
		if (t->token == token && !strchr(t->pattern, '='))
		if (spec->opt == token && !spec->type)
			break;
			break;
	return t->pattern;
	return spec->name;
}
}


/*
/*