diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/shmem.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 8793e8cc1a48..1c02c6c20f45 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3381,9 +3381,19 @@ enum shmem_param { Opt_uid, }; +static const struct fs_parameter_enum shmem_param_enums_huge[] = { + {"never", SHMEM_HUGE_NEVER }, + {"always", SHMEM_HUGE_ALWAYS }, + {"within_size", SHMEM_HUGE_WITHIN_SIZE }, + {"advise", SHMEM_HUGE_ADVISE }, + {"deny", SHMEM_HUGE_DENY }, + {"force", SHMEM_HUGE_FORCE }, + {} +}; + static const struct fs_parameter_spec shmem_param_specs[] = { fsparam_u32 ("gid", Opt_gid), - fsparam_enum ("huge", Opt_huge), + fsparam_enum ("huge", Opt_huge, shmem_param_enums_huge), fsparam_u32oct("mode", Opt_mode), fsparam_string("mpol", Opt_mpol), fsparam_string("nr_blocks", Opt_nr_blocks), @@ -3393,18 +3403,9 @@ static const struct fs_parameter_spec shmem_param_specs[] = { {} }; -static const struct fs_parameter_enum shmem_param_enums[] = { - { Opt_huge, "never", SHMEM_HUGE_NEVER }, - { Opt_huge, "always", SHMEM_HUGE_ALWAYS }, - { Opt_huge, "within_size", SHMEM_HUGE_WITHIN_SIZE }, - { Opt_huge, "advise", SHMEM_HUGE_ADVISE }, - {} -}; - const struct fs_parameter_description shmem_fs_parameters = { .name = "tmpfs", .specs = shmem_param_specs, - .enums = shmem_param_enums, }; static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param) |