diff mbox series

[v2,15/17] ext4: change token2str() to use ext4_param_specs

Message ID 20200428164536.462-16-lczerner@redhat.com
State Superseded
Headers show
Series ext4: new mount API conversion | expand

Commit Message

Lukas Czerner April 28, 2020, 4:45 p.m. UTC
Chage 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>
---
 fs/ext4/super.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index df7d1a724f1b..41075fdd076a 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2691,12 +2691,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;
 }
 
 /*