summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2019-12-06 10:45:01 -0600
committerAl Viro <viro@zeniv.linux.org.uk>2020-02-07 14:48:36 -0500
commit96cafb9ccb153f6a82ff2c9bde68916d9d65501e (patch)
tree80cd952c6140a5b61bdf69531849db2413f26c4a
parentcc3c0b533ab9142eac2e291628fbfca3685f38cd (diff)
downloadblackbird-op-linux-96cafb9ccb153f6a82ff2c9bde68916d9d65501e.tar.gz
blackbird-op-linux-96cafb9ccb153f6a82ff2c9bde68916d9d65501e.zip
fs_parser: remove fs_parameter_description name field
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>
-rw-r--r--Documentation/filesystems/mount_api.txt11
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c1
-rw-r--r--arch/s390/hypfs/inode.c1
-rw-r--r--arch/x86/kernel/cpu/resctrl/rdtgroup.c1
-rw-r--r--drivers/block/rbd.c1
-rw-r--r--drivers/usb/gadget/function/f_fs.c1
-rw-r--r--fs/afs/super.c1
-rw-r--r--fs/ceph/super.c1
-rw-r--r--fs/filesystems.c3
-rw-r--r--fs/fs_parser.c10
-rw-r--r--fs/fuse/inode.c1
-rw-r--r--fs/gfs2/ops_fstype.c1
-rw-r--r--fs/hugetlbfs/inode.c1
-rw-r--r--fs/jffs2/super.c1
-rw-r--r--fs/nfs/fs_context.c1
-rw-r--r--fs/proc/root.c1
-rw-r--r--fs/ramfs/inode.c1
-rw-r--r--fs/xfs/xfs_super.c1
-rw-r--r--include/linux/fs_parser.h7
-rw-r--r--kernel/bpf/inode.c1
-rw-r--r--kernel/cgroup/cgroup-v1.c1
-rw-r--r--kernel/cgroup/cgroup.c1
-rw-r--r--mm/shmem.c1
-rw-r--r--net/ceph/ceph_common.c1
-rw-r--r--security/selinux/hooks.c3
-rw-r--r--security/smack/smack_lsm.c1
26 files changed, 11 insertions, 44 deletions
diff --git a/Documentation/filesystems/mount_api.txt b/Documentation/filesystems/mount_api.txt
index b96e73591327..87c14bbb2b35 100644
--- a/Documentation/filesystems/mount_api.txt
+++ b/Documentation/filesystems/mount_api.txt
@@ -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:
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 9b1586b85152..36ce5d0ac675 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -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,
};
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 70139d0791b6..b3a6d13a63bf 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -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,
};
diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
index 2e3b06d6bbc6..f145594e4d6a 100644
--- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
+++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
@@ -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,
};
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 47e82f076a12..e87486920382 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -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,
};
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 0bbccac94d6c..eda1972b70eb 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -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,
};
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 8d71d10761b7..862c806bc22f 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -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,
};
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 4125de07221b..497469149e4b 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -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,
};
diff --git a/fs/filesystems.c b/fs/filesystems.c
index 9135646e41ac..77bf5f95362d 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -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, '.'));
diff --git a/fs/fs_parser.c b/fs/fs_parser.c
index 4c410eef0173..3ed1e49d8267 100644
--- a/fs/fs_parser.c
+++ b/fs/fs_parser.c
@@ -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;
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 16aec32f7f3d..5a01daadee7e 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -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,
};
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 16230e496fdb..8bc20425a830 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -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,
};
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index a66e425884d1..c073f76478af 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -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,
};
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 1e54f736865d..f6fda79e98cf 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -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,
};
diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c
index c0ddeecadfac..5f45e637e62a 100644
--- a/fs/nfs/fs_context.c
+++ b/fs/nfs/fs_context.c
@@ -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,
};
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 0b7c8dffc9ae..c44765447d05 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -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,
};
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index d82636e8eb65..bb7ab562ff4d 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -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,
};
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index d9ae27ddf253..ee23a2bf1a81 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -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,
};
diff --git a/include/linux/fs_parser.h b/include/linux/fs_parser.h
index 37459124c1c1..ac439ee50aab 100644
--- a/include/linux/fs_parser.h
+++ b/include/linux/fs_parser.h
@@ -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
diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c
index ecf42bec38c0..9608aa48128d 100644
--- a/kernel/bpf/inode.c
+++ b/kernel/bpf/inode.c
@@ -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,
};
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
index 77eb72b704a6..c7b526f33621 100644
--- a/kernel/cgroup/cgroup-v1.c
+++ b/kernel/cgroup/cgroup-v1.c
@@ -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,
};
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 735af8f15f95..d86d441d93ca 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -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,
};
diff --git a/mm/shmem.c b/mm/shmem.c
index 90c7737bcce2..445d038a54b9 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -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,
};
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
index d435d22999f5..f639e04d9c63 100644
--- a/net/ceph/ceph_common.c
+++ b/net/ceph/ceph_common.c
@@ -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,
};
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 116b4d644f68..54f34631bc16 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -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;
}
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index ecea41ce919b..646c0b4aa8c4 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -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,
};
OpenPOWER on IntegriCloud