Skip to content

Commit 96cafb9

Browse files
sandeenAl Viro
authored andcommitted
fs_parser: remove fs_parameter_description name field
Unused now. Signed-off-by: Eric Sandeen <[email protected]> Acked-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent cc3c0b5 commit 96cafb9

File tree

26 files changed

+11
-44
lines changed

26 files changed

+11
-44
lines changed

Documentation/filesystems/mount_api.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ Parameters are described using structures defined in linux/fs_parser.h.
518518
There's a core description struct that links everything together:
519519

520520
struct fs_parameter_description {
521-
const char name[16];
522521
const struct fs_parameter_spec *specs;
523522
const struct fs_parameter_enum *enums;
524523
};
@@ -534,19 +533,13 @@ For example:
534533
};
535534

536535
static const struct fs_parameter_description afs_fs_parameters = {
537-
.name = "kAFS",
538536
.specs = afs_param_specs,
539537
.enums = afs_param_enums,
540538
};
541539

542540
The members are as follows:
543541

544-
(1) const char name[16];
545-
546-
The name to be used in error messages generated by the parse helper
547-
functions.
548-
549-
(2) const struct fs_parameter_specification *specs;
542+
(1) const struct fs_parameter_specification *specs;
550543

551544
Table of parameter specifications, terminated with a null entry, where the
552545
entries are of type:
@@ -625,7 +618,7 @@ The members are as follows:
625618
of arguments to specify the type and the flags for anything that doesn't
626619
match one of the above macros.
627620

628-
(6) const struct fs_parameter_enum *enums;
621+
(2) const struct fs_parameter_enum *enums;
629622

630623
Table of enum value names to integer mappings, terminated with a null
631624
entry. This is of type:

arch/powerpc/platforms/cell/spufs/inode.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,6 @@ static const struct fs_parameter_spec spufs_param_specs[] = {
592592
};
593593

594594
static const struct fs_parameter_description spufs_fs_parameters = {
595-
.name = "spufs",
596595
.specs = spufs_param_specs,
597596
};
598597

arch/s390/hypfs/inode.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ static const struct fs_parameter_spec hypfs_param_specs[] = {
216216
};
217217

218218
static const struct fs_parameter_description hypfs_fs_parameters = {
219-
.name = "hypfs",
220219
.specs = hypfs_param_specs,
221220
};
222221

arch/x86/kernel/cpu/resctrl/rdtgroup.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,6 @@ static const struct fs_parameter_spec rdt_param_specs[] = {
20452045
};
20462046

20472047
static const struct fs_parameter_description rdt_fs_parameters = {
2048-
.name = "rdt",
20492048
.specs = rdt_param_specs,
20502049
};
20512050

drivers/block/rbd.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,6 @@ static const struct fs_parameter_spec rbd_param_specs[] = {
864864
};
865865

866866
static const struct fs_parameter_description rbd_parameters = {
867-
.name = "rbd",
868867
.specs = rbd_param_specs,
869868
};
870869

drivers/usb/gadget/function/f_fs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,6 @@ static const struct fs_parameter_spec ffs_fs_param_specs[] = {
14971497
};
14981498

14991499
static const struct fs_parameter_description ffs_fs_fs_parameters = {
1500-
.name = "kAFS",
15011500
.specs = ffs_fs_param_specs,
15021501
};
15031502

fs/afs/super.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ static const struct fs_parameter_spec afs_param_specs[] = {
9090
};
9191

9292
static const struct fs_parameter_description afs_fs_parameters = {
93-
.name = "kAFS",
9493
.specs = afs_param_specs,
9594
};
9695

fs/ceph/super.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ static const struct fs_parameter_spec ceph_mount_param_specs[] = {
199199
};
200200

201201
static const struct fs_parameter_description ceph_mount_parameters = {
202-
.name = "ceph",
203202
.specs = ceph_mount_param_specs,
204203
};
205204

fs/filesystems.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ int register_filesystem(struct file_system_type * fs)
7474
int res = 0;
7575
struct file_system_type ** p;
7676

77-
if (fs->parameters && !fs_validate_description(fs->parameters))
77+
if (fs->parameters &&
78+
!fs_validate_description(fs->name, fs->parameters))
7879
return -EINVAL;
7980

8081
BUG_ON(strchr(fs->name, '.'));

fs/fs_parser.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,20 +354,14 @@ bool validate_constant_table(const struct constant_table *tbl, size_t tbl_size,
354354
* fs_validate_description - Validate a parameter description
355355
* @desc: The parameter description to validate.
356356
*/
357-
bool fs_validate_description(const struct fs_parameter_description *desc)
357+
bool fs_validate_description(const char *name,
358+
const struct fs_parameter_description *desc)
358359
{
359360
const struct fs_parameter_spec *param, *p2;
360-
const char *name = desc->name;
361361
bool good = true;
362362

363363
pr_notice("*** VALIDATE %s ***\n", name);
364364

365-
if (!name[0]) {
366-
pr_err("VALIDATE Parser: No name\n");
367-
name = "Unknown";
368-
good = false;
369-
}
370-
371365
if (desc->specs) {
372366
for (param = desc->specs; param->name; param++) {
373367
enum fs_parameter_type t = param->type;

0 commit comments

Comments
 (0)