diff options
author | Lukas Czerner <lczerner@redhat.com> | 2021-10-27 16:18:55 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-12-09 14:11:08 -0500 |
commit | 97d8a670b4531437d5b842cf68dafa6d1a932ddf (patch) | |
tree | 57bf4d5dd94f5ce3ab130306c32cbb85bf8ccf40 /fs/ext4 | |
parent | 02f960f8db1cd0aa9c182f8804b2b41ffd2c37b2 (diff) |
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: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Link: https://lore.kernel.org/r/20211027141857.33657-12-lczerner@redhat.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/super.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ebde5fb67222..285f18f643ca 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3046,12 +3046,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; } /* |