fold struct fs_parameter_enum into struct constant_table
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 16 Dec 2019 18:33:32 +0000 (13:33 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 7 Feb 2020 05:12:50 +0000 (00:12 -0500)
no real difference now

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/afs/super.c
fs/ceph/super.c
fs/fs_parser.c
fs/gfs2/ops_fstype.c
fs/jffs2/super.c
fs/nfs/fs_context.c
include/linux/fs_parser.h
mm/shmem.c

index 42bf63b82007c6fbf72f9e110062d9fa17611be8..8d71d10761b71c0c9390e25b33237af49ec23610 100644 (file)
@@ -73,7 +73,7 @@ enum afs_param {
        Opt_source,
 };
 
-static const struct fs_parameter_enum afs_param_flock[] = {
+static const struct constant_table afs_param_flock[] = {
        {"local",       afs_flock_mode_local },
        {"openafs",     afs_flock_mode_openafs },
        {"strict",      afs_flock_mode_strict },
index 0f7c8913bb208342c3bcb1db40208e30ca7fa18b..2bad9bc1fd70d8c18a3d012bcc4e2d72f1da008c 100644 (file)
@@ -163,7 +163,7 @@ enum ceph_recover_session_mode {
        ceph_recover_session_clean
 };
 
-static const struct fs_parameter_enum ceph_param_recover[] = {
+static const struct constant_table ceph_param_recover[] = {
        { "no",         ceph_recover_session_no },
        { "clean",      ceph_recover_session_clean },
        {}
index 34275191697f167aaebc33aef4cc62ffc9dd73f7..d032ac4a758da886919a46b4a43353608cf49f89 100644 (file)
@@ -82,7 +82,7 @@ int fs_parse(struct fs_context *fc,
             struct fs_parse_result *result)
 {
        const struct fs_parameter_spec *p;
-       const struct fs_parameter_enum *e;
+       const struct constant_table *e;
        int ret = -ENOPARAM, b;
 
        result->negated = false;
@@ -380,7 +380,7 @@ bool fs_validate_description(const struct fs_parameter_description *desc)
                                       name, param->name, t);
                                good = false;
                        } else if (t == fs_param_is_enum) {
-                               const struct fs_parameter_enum *e = param->data;
+                               const struct constant_table *e = param->data;
                                if (!e || !e->name) {
                                        pr_err("VALIDATE %s: PARAM[%s] enum with no values\n",
                                               name, param->name);
index 0df8f2df9491423fb361481096bd6d1012fcac2a..16230e496fdb4c074b79f6ed5e35b51f20d6ffb0 100644 (file)
@@ -1271,7 +1271,7 @@ enum opt_quota {
        Opt_quota_on,
 };
 
-static const struct fs_parameter_enum gfs2_param_quota[] = {
+static const struct constant_table gfs2_param_quota[] = {
        {"off",        Opt_quota_off },
        {"account",    Opt_quota_account },
        {"on",         Opt_quota_on },
@@ -1289,7 +1289,7 @@ enum opt_data {
        Opt_data_ordered   = GFS2_DATA_ORDERED,
 };
 
-static const struct fs_parameter_enum gfs2_param_data[] = {
+static const struct constant_table gfs2_param_data[] = {
        {"writeback",  Opt_data_writeback },
        {"ordered",    Opt_data_ordered },
        {}
@@ -1300,7 +1300,7 @@ enum opt_errors {
        Opt_errors_panic    = GFS2_ERRORS_PANIC,
 };
 
-static const struct fs_parameter_enum gfs2_param_errors[] = {
+static const struct constant_table gfs2_param_errors[] = {
        {"withdraw",   Opt_errors_withdraw },
        {"panic",      Opt_errors_panic },
        {}
index ecd1a13a35d8add9e02816f3b07c4fd906332277..1e54f736865d09b4bae80524b4fcbaef66260af4 100644 (file)
@@ -167,7 +167,7 @@ enum {
        Opt_rp_size,
 };
 
-static const struct fs_parameter_enum jffs2_param_compr[] = {
+static const struct constant_table jffs2_param_compr[] = {
        {"none",        JFFS2_COMPR_MODE_NONE },
 #ifdef CONFIG_JFFS2_LZO
        {"lzo",         JFFS2_COMPR_MODE_FORCELZO },
index 01c76885f54e83e1c7f8e1bd1e57ebfc94e7cb6d..c0ddeecadfac53a9bf2ab39c24074b11c26d8254 100644 (file)
@@ -90,7 +90,7 @@ enum {
        Opt_local_lock_posix,
 };
 
-static const struct fs_parameter_enum nfs_param_enums_local_lock[] = {
+static const struct constant_table nfs_param_enums_local_lock[] = {
        { "all",                Opt_local_lock_all },
        { "flock",      Opt_local_lock_flock },
        { "none",               Opt_local_lock_none },
@@ -103,7 +103,7 @@ enum {
        Opt_lookupcache_positive,
 };
 
-static const struct fs_parameter_enum nfs_param_enums_lookupcache[] = {
+static const struct constant_table nfs_param_enums_lookupcache[] = {
        { "all",                Opt_lookupcache_all },
        { "none",               Opt_lookupcache_none },
        { "pos",                Opt_lookupcache_positive },
index 498cba1bbf6e41cabb07a6225c5a98c8e55f7ef2..5c91a0ac44464e51d225a5b0297dcc0e43f69ee4 100644 (file)
@@ -56,11 +56,6 @@ struct fs_parameter_spec {
        const void              *data;
 };
 
-struct fs_parameter_enum {
-       const char      *name;
-       u8              value;
-};
-
 struct fs_parameter_description {
        const char      name[16];               /* Name for logging purposes */
        const struct fs_parameter_spec *specs;  /* List of param specifications */
index 1c02c6c20f45684bca3aea8a56545953feaf3b9e..90c7737bcce2db0626571259b020223281665d47 100644 (file)
@@ -3381,7 +3381,7 @@ enum shmem_param {
        Opt_uid,
 };
 
-static const struct fs_parameter_enum shmem_param_enums_huge[] = {
+static const struct constant_table shmem_param_enums_huge[] = {
        {"never",       SHMEM_HUGE_NEVER },
        {"always",      SHMEM_HUGE_ALWAYS },
        {"within_size", SHMEM_HUGE_WITHIN_SIZE },