fs_parser: remove fs_parameter_description name field
authorEric Sandeen <sandeen@sandeen.net>
Fri, 6 Dec 2019 16:45:01 +0000 (10:45 -0600)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 7 Feb 2020 19:48:36 +0000 (14:48 -0500)
Unused now.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
26 files changed:
Documentation/filesystems/mount_api.txt
arch/powerpc/platforms/cell/spufs/inode.c
arch/s390/hypfs/inode.c
arch/x86/kernel/cpu/resctrl/rdtgroup.c
drivers/block/rbd.c
drivers/usb/gadget/function/f_fs.c
fs/afs/super.c
fs/ceph/super.c
fs/filesystems.c
fs/fs_parser.c
fs/fuse/inode.c
fs/gfs2/ops_fstype.c
fs/hugetlbfs/inode.c
fs/jffs2/super.c
fs/nfs/fs_context.c
fs/proc/root.c
fs/ramfs/inode.c
fs/xfs/xfs_super.c
include/linux/fs_parser.h
kernel/bpf/inode.c
kernel/cgroup/cgroup-v1.c
kernel/cgroup/cgroup.c
mm/shmem.c
net/ceph/ceph_common.c
security/selinux/hooks.c
security/smack/smack_lsm.c

index b96e73591327b16e9f4f8048b64731d2698a1648..87c14bbb2b35a052908431345acf6215c0f1f95b 100644 (file)
@@ -518,7 +518,6 @@ Parameters are described using structures defined in linux/fs_parser.h.
 There's a core description struct that links everything together:
 
        struct fs_parameter_description {
-               const char      name[16];
                const struct fs_parameter_spec *specs;
                const struct fs_parameter_enum *enums;
        };
@@ -534,19 +533,13 @@ For example:
        };
 
        static const struct fs_parameter_description afs_fs_parameters = {
-               .name           = "kAFS",
                .specs          = afs_param_specs,
                .enums          = afs_param_enums,
        };
 
 The members are as follows:
 
- (1) const char name[16];
-
-     The name to be used in error messages generated by the parse helper
-     functions.
-
- (2) const struct fs_parameter_specification *specs;
+ (1) const struct fs_parameter_specification *specs;
 
      Table of parameter specifications, terminated with a null entry, where the
      entries are of type:
@@ -625,7 +618,7 @@ The members are as follows:
      of arguments to specify the type and the flags for anything that doesn't
      match one of the above macros.
 
- (6) const struct fs_parameter_enum *enums;
+ (2) const struct fs_parameter_enum *enums;
 
      Table of enum value names to integer mappings, terminated with a null
      entry.  This is of type:
index 9b1586b851524756f724a6a6ed6176f80c500016..36ce5d0ac6753d829a08243905505b3c0fefcf44 100644 (file)
@@ -592,7 +592,6 @@ static const struct fs_parameter_spec spufs_param_specs[] = {
 };
 
 static const struct fs_parameter_description spufs_fs_parameters = {
-       .name           = "spufs",
        .specs          = spufs_param_specs,
 };
 
index 70139d0791b616d097723cc837b0a8c5c931549f..b3a6d13a63bffd304c0bb9c87f3d591aaa4eef8d 100644 (file)
@@ -216,7 +216,6 @@ static const struct fs_parameter_spec hypfs_param_specs[] = {
 };
 
 static const struct fs_parameter_description hypfs_fs_parameters = {
-       .name           = "hypfs",
        .specs          = hypfs_param_specs,
 };
 
index 2e3b06d6bbc6df9b311bd6e9b942ea0ea4b1fc67..f145594e4d6a7b8f067469ce1b1f4a1634221b01 100644 (file)
@@ -2045,7 +2045,6 @@ static const struct fs_parameter_spec rdt_param_specs[] = {
 };
 
 static const struct fs_parameter_description rdt_fs_parameters = {
-       .name           = "rdt",
        .specs          = rdt_param_specs,
 };
 
index 47e82f076a124361c55e06825d2587ee0f68792a..e874869203821798fc642d61b61e26ba2904dcf2 100644 (file)
@@ -864,7 +864,6 @@ static const struct fs_parameter_spec rbd_param_specs[] = {
 };
 
 static const struct fs_parameter_description rbd_parameters = {
-       .name           = "rbd",
        .specs          = rbd_param_specs,
 };
 
index 0bbccac94d6c5eea78050d67bbf42dcf5f028842..eda1972b70eb1e903e0de0a5d41e36ed4d66e2cb 100644 (file)
@@ -1497,7 +1497,6 @@ static const struct fs_parameter_spec ffs_fs_param_specs[] = {
 };
 
 static const struct fs_parameter_description ffs_fs_fs_parameters = {
-       .name           = "kAFS",
        .specs          = ffs_fs_param_specs,
 };
 
index 8d71d10761b71c0c9390e25b33237af49ec23610..862c806bc22fabca87204a9ab6a7105eff4a5cf0 100644 (file)
@@ -90,7 +90,6 @@ static const struct fs_parameter_spec afs_param_specs[] = {
 };
 
 static const struct fs_parameter_description afs_fs_parameters = {
-       .name           = "kAFS",
        .specs          = afs_param_specs,
 };
 
index 4125de07221b5f99ad4ac98a94dd1781060d74d3..497469149e4b38346050a4a5b016df2e1203bb7a 100644 (file)
@@ -199,7 +199,6 @@ static const struct fs_parameter_spec ceph_mount_param_specs[] = {
 };
 
 static const struct fs_parameter_description ceph_mount_parameters = {
-       .name           = "ceph",
        .specs          = ceph_mount_param_specs,
 };
 
index 9135646e41aca06e305743dfe52f572c321d3f27..77bf5f95362da5ec767c4919e4271c11120a18ff 100644 (file)
@@ -74,7 +74,8 @@ int register_filesystem(struct file_system_type * fs)
        int res = 0;
        struct file_system_type ** p;
 
-       if (fs->parameters && !fs_validate_description(fs->parameters))
+       if (fs->parameters &&
+           !fs_validate_description(fs->name, fs->parameters))
                return -EINVAL;
 
        BUG_ON(strchr(fs->name, '.'));
index 4c410eef0173f5caea9e62be169e939ab55c52b1..3ed1e49d826792600a1cec0feb3aa79ec6757f05 100644 (file)
@@ -354,20 +354,14 @@ bool validate_constant_table(const struct constant_table *tbl, size_t tbl_size,
  * fs_validate_description - Validate a parameter description
  * @desc: The parameter description to validate.
  */
-bool fs_validate_description(const struct fs_parameter_description *desc)
+bool fs_validate_description(const char *name,
+       const struct fs_parameter_description *desc)
 {
        const struct fs_parameter_spec *param, *p2;
-       const char *name = desc->name;
        bool good = true;
 
        pr_notice("*** VALIDATE %s ***\n", name);
 
-       if (!name[0]) {
-               pr_err("VALIDATE Parser: No name\n");
-               name = "Unknown";
-               good = false;
-       }
-
        if (desc->specs) {
                for (param = desc->specs; param->name; param++) {
                        enum fs_parameter_type t = param->type;
index 16aec32f7f3d71767746a886a95e8dfd151d24de..5a01daadee7ed52e07724f973b7b76948192c920 100644 (file)
@@ -463,7 +463,6 @@ static const struct fs_parameter_spec fuse_param_specs[] = {
 };
 
 static const struct fs_parameter_description fuse_fs_parameters = {
-       .name           = "fuse",
        .specs          = fuse_param_specs,
 };
 
index 16230e496fdb4c074b79f6ed5e35b51f20d6ffb0..8bc20425a8305299f0bf589d262cd01ce639f4a4 100644 (file)
@@ -1337,7 +1337,6 @@ static const struct fs_parameter_spec gfs2_param_specs[] = {
 };
 
 static const struct fs_parameter_description gfs2_fs_parameters = {
-       .name = "gfs2",
        .specs = gfs2_param_specs,
 };
 
index a66e425884d14e000aa2f85b85c776cae0d347c0..c073f76478af092c99920fb4a4ac939032820bec 100644 (file)
@@ -85,7 +85,6 @@ static const struct fs_parameter_spec hugetlb_param_specs[] = {
 };
 
 static const struct fs_parameter_description hugetlb_fs_parameters = {
-       .name           = "hugetlbfs",
        .specs          = hugetlb_param_specs,
 };
 
index 1e54f736865d09b4bae80524b4fcbaef66260af4..f6fda79e98cfb01a47c3082ab7a3bec0b9002b5a 100644 (file)
@@ -185,7 +185,6 @@ static const struct fs_parameter_spec jffs2_param_specs[] = {
 };
 
 const struct fs_parameter_description jffs2_fs_parameters = {
-       .name           = "jffs2",
        .specs          = jffs2_param_specs,
 };
 
index c0ddeecadfac53a9bf2ab39c24074b11c26d8254..5f45e637e62a4be3ef7e5ab9f26195fce4737c5b 100644 (file)
@@ -174,7 +174,6 @@ static const struct fs_parameter_spec nfs_param_specs[] = {
 };
 
 static const struct fs_parameter_description nfs_fs_parameters = {
-       .name           = "nfs",
        .specs          = nfs_param_specs,
 };
 
index 0b7c8dffc9ae85d6c07871998d8e75822899be9b..c44765447d05fba80e4ebca78a4d8cf3069c6e8d 100644 (file)
@@ -48,7 +48,6 @@ static const struct fs_parameter_spec proc_param_specs[] = {
 };
 
 static const struct fs_parameter_description proc_fs_parameters = {
-       .name           = "proc",
        .specs          = proc_param_specs,
 };
 
index d82636e8eb6513d528dc52a147b7fa53df08149c..bb7ab562ff4da9001585852a7f71dc4c65f3657b 100644 (file)
@@ -187,7 +187,6 @@ static const struct fs_parameter_spec ramfs_param_specs[] = {
 };
 
 const struct fs_parameter_description ramfs_fs_parameters = {
-       .name           = "ramfs",
        .specs          = ramfs_param_specs,
 };
 
index d9ae27ddf253bba6763a10fa8fde72425c5d6df1..ee23a2bf1a81c8588e18a28d1d8997ae6cca41f0 100644 (file)
@@ -107,7 +107,6 @@ static const struct fs_parameter_spec xfs_param_specs[] = {
 };
 
 static const struct fs_parameter_description xfs_fs_parameters = {
-       .name           = "xfs",
        .specs          = xfs_param_specs,
 };
 
index 37459124c1c154453aa2b56e78c3c7944ece80c1..ac439ee50aab15425dd35bfe5955238b607c5299 100644 (file)
@@ -57,7 +57,6 @@ struct fs_parameter_spec {
 };
 
 struct fs_parameter_description {
-       const char      name[16];               /* Name for logging purposes */
        const struct fs_parameter_spec *specs;  /* List of param specifications */
 };
 
@@ -97,12 +96,14 @@ extern int lookup_constant(const struct constant_table tbl[], const char *name,
 #ifdef CONFIG_VALIDATE_FS_PARSER
 extern bool validate_constant_table(const struct constant_table *tbl, size_t tbl_size,
                                    int low, int high, int special);
-extern bool fs_validate_description(const struct fs_parameter_description *desc);
+extern bool fs_validate_description(const char *name,
+                                   const struct fs_parameter_description *desc);
 #else
 static inline bool validate_constant_table(const struct constant_table *tbl, size_t tbl_size,
                                           int low, int high, int special)
 { return true; }
-static inline bool fs_validate_description(const struct fs_parameter_description *desc)
+static inline bool fs_validate_description(const char *name,
+                                          const struct fs_parameter_description *desc)
 { return true; }
 #endif
 
index ecf42bec38c001178563e11feab3ded018e0a312..9608aa48128d13732195bfadcfdf2ff65535c6fa 100644 (file)
@@ -593,7 +593,6 @@ static const struct fs_parameter_spec bpf_param_specs[] = {
 };
 
 static const struct fs_parameter_description bpf_fs_parameters = {
-       .name           = "bpf",
        .specs          = bpf_param_specs,
 };
 
index 77eb72b704a6d7a6da1f0db8b3b12ddd9447cbcf..c7b526f336218d1d55073bb8bcc8a1c3ea676b7e 100644 (file)
@@ -898,7 +898,6 @@ static const struct fs_parameter_spec cgroup1_param_specs[] = {
 };
 
 const struct fs_parameter_description cgroup1_fs_parameters = {
-       .name           = "cgroup1",
        .specs          = cgroup1_param_specs,
 };
 
index 735af8f15f95406d8d468d2fbacd3ff7ed2a715e..d86d441d93ca6be1a25372da45e8df85b9a839af 100644 (file)
@@ -1823,7 +1823,6 @@ static const struct fs_parameter_spec cgroup2_param_specs[] = {
 };
 
 static const struct fs_parameter_description cgroup2_fs_parameters = {
-       .name           = "cgroup2",
        .specs          = cgroup2_param_specs,
 };
 
index 90c7737bcce2db0626571259b020223281665d47..445d038a54b909097d79636352615093593dadf7 100644 (file)
@@ -3404,7 +3404,6 @@ static const struct fs_parameter_spec shmem_param_specs[] = {
 };
 
 const struct fs_parameter_description shmem_fs_parameters = {
-       .name           = "tmpfs",
        .specs          = shmem_param_specs,
 };
 
index d435d22999f5ad3e104034205333e6c3ff308d5e..f639e04d9c63073cc728ca0fd45c307577ea398c 100644 (file)
@@ -291,7 +291,6 @@ static const struct fs_parameter_spec ceph_param_specs[] = {
 };
 
 static const struct fs_parameter_description ceph_parameters = {
-        .name           = "libceph",
         .specs          = ceph_param_specs,
 };
 
index 116b4d644f68935a82083cdbdd232c5243d203cc..54f34631bc1638eb0076e0239b2daa5f0a94c627 100644 (file)
@@ -2818,7 +2818,6 @@ static const struct fs_parameter_spec selinux_param_specs[] = {
 };
 
 static const struct fs_parameter_description selinux_fs_parameters = {
-       .name           = "SELinux",
        .specs          = selinux_param_specs,
 };
 
@@ -7145,7 +7144,7 @@ static __init int selinux_init(void)
        else
                pr_debug("SELinux:  Starting in permissive mode\n");
 
-       fs_validate_description(&selinux_fs_parameters);
+       fs_validate_description("selinux", &selinux_fs_parameters);
 
        return 0;
 }
index ecea41ce919b71101ed2d9ae81b477fa7ae5b577..646c0b4aa8c415676e8c8b411430e56d6599e00a 100644 (file)
@@ -689,7 +689,6 @@ static const struct fs_parameter_spec smack_param_specs[] = {
 };
 
 static const struct fs_parameter_description smack_fs_parameters = {
-       .name           = "smack",
        .specs          = smack_param_specs,
 };