Skip to content

Commit 9193ae8

Browse files
author
Miklos Szeredi
committed
vfs: don't parse forbidden flags
Makes little sense to keep this blacklist synced with what mount(8) parses and what it doesn't. E.g. it has various forms of "*atime" options, but not "atime"... Signed-off-by: Miklos Szeredi <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent 80340fe commit 9193ae8

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

fs/fs_context.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -57,40 +57,12 @@ static const struct constant_table common_clear_sb_flag[] = {
5757
{ },
5858
};
5959

60-
static const char *const forbidden_sb_flag[] = {
61-
"bind",
62-
"dev",
63-
"exec",
64-
"move",
65-
"noatime",
66-
"nodev",
67-
"nodiratime",
68-
"noexec",
69-
"norelatime",
70-
"nostrictatime",
71-
"nosuid",
72-
"private",
73-
"rec",
74-
"relatime",
75-
"remount",
76-
"shared",
77-
"slave",
78-
"strictatime",
79-
"suid",
80-
"unbindable",
81-
};
82-
8360
/*
8461
* Check for a common mount option that manipulates s_flags.
8562
*/
8663
static int vfs_parse_sb_flag(struct fs_context *fc, const char *key)
8764
{
8865
unsigned int token;
89-
unsigned int i;
90-
91-
for (i = 0; i < ARRAY_SIZE(forbidden_sb_flag); i++)
92-
if (strcmp(key, forbidden_sb_flag[i]) == 0)
93-
return -EINVAL;
9466

9567
token = lookup_constant(common_set_sb_flag, key, 0);
9668
if (token) {

0 commit comments

Comments
 (0)