Commit d7167b14 authored by Al Viro's avatar Al Viro
Browse files

fs_parse: fold fs_parameter_desc/fs_parameter_spec



The former contains nothing but a pointer to an array of the latter...

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 96cafb9c
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@ enum {
	Opt_uid, Opt_gid, Opt_mode, Opt_debug,
};

static const struct fs_parameter_spec spufs_param_specs[] = {
static const struct fs_parameter_spec spufs_fs_parameters[] = {
	fsparam_u32	("gid",				Opt_gid),
	fsparam_u32oct	("mode",			Opt_mode),
	fsparam_u32	("uid",				Opt_uid),
@@ -591,10 +591,6 @@ static const struct fs_parameter_spec spufs_param_specs[] = {
	{}
};

static const struct fs_parameter_description spufs_fs_parameters = {
	.specs		= spufs_param_specs,
};

static int spufs_show_options(struct seq_file *m, struct dentry *root)
{
	struct spufs_sb_info *sbi = spufs_get_sb_info(root->d_sb);
@@ -622,7 +618,7 @@ static int spufs_parse_param(struct fs_context *fc, struct fs_parameter *param)
	kgid_t gid;
	int opt;

	opt = fs_parse(fc, &spufs_fs_parameters, param, &result);
	opt = fs_parse(fc, spufs_fs_parameters, param, &result);
	if (opt < 0)
		return opt;

@@ -773,7 +769,7 @@ static struct file_system_type spufs_type = {
	.owner = THIS_MODULE,
	.name = "spufs",
	.init_fs_context = spufs_init_fs_context,
	.parameters	= &spufs_fs_parameters,
	.parameters	= spufs_fs_parameters,
	.kill_sb = kill_litter_super,
};
MODULE_ALIAS_FS("spufs");
+3 −7
Original line number Diff line number Diff line
@@ -209,16 +209,12 @@ static int hypfs_release(struct inode *inode, struct file *filp)

enum { Opt_uid, Opt_gid, };

static const struct fs_parameter_spec hypfs_param_specs[] = {
static const struct fs_parameter_spec hypfs_fs_parameters[] = {
	fsparam_u32("gid", Opt_gid),
	fsparam_u32("uid", Opt_uid),
	{}
};

static const struct fs_parameter_description hypfs_fs_parameters = {
	.specs		= hypfs_param_specs,
};

static int hypfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
{
	struct hypfs_sb_info *hypfs_info = fc->s_fs_info;
@@ -227,7 +223,7 @@ static int hypfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
	kgid_t gid;
	int opt;

	opt = fs_parse(fc, &hypfs_fs_parameters, param, &result);
	opt = fs_parse(fc, hypfs_fs_parameters, param, &result);
	if (opt < 0)
		return opt;

@@ -454,7 +450,7 @@ static struct file_system_type hypfs_type = {
	.owner		= THIS_MODULE,
	.name		= "s390_hypfs",
	.init_fs_context = hypfs_init_fs_context,
	.parameters	= &hypfs_fs_parameters,
	.parameters	= hypfs_fs_parameters,
	.kill_sb	= hypfs_kill_super
};

+3 −7
Original line number Diff line number Diff line
@@ -2037,24 +2037,20 @@ enum rdt_param {
	nr__rdt_params
};

static const struct fs_parameter_spec rdt_param_specs[] = {
static const struct fs_parameter_spec rdt_fs_parameters[] = {
	fsparam_flag("cdp",		Opt_cdp),
	fsparam_flag("cdpl2",		Opt_cdpl2),
	fsparam_flag("mba_MBps",	Opt_mba_mbps),
	{}
};

static const struct fs_parameter_description rdt_fs_parameters = {
	.specs		= rdt_param_specs,
};

static int rdt_parse_param(struct fs_context *fc, struct fs_parameter *param)
{
	struct rdt_fs_context *ctx = rdt_fc2context(fc);
	struct fs_parse_result result;
	int opt;

	opt = fs_parse(fc, &rdt_fs_parameters, param, &result);
	opt = fs_parse(fc, rdt_fs_parameters, param, &result);
	if (opt < 0)
		return opt;

@@ -2279,7 +2275,7 @@ static void rdt_kill_sb(struct super_block *sb)
static struct file_system_type rdt_fs_type = {
	.name			= "resctrl",
	.init_fs_context	= rdt_init_fs_context,
	.parameters		= &rdt_fs_parameters,
	.parameters		= rdt_fs_parameters,
	.kill_sb		= rdt_kill_sb,
};

+2 −2
Original line number Diff line number Diff line
@@ -71,10 +71,10 @@ static struct file_system_type internal_fs_type = {
	.name = "devtmpfs",
#ifdef CONFIG_TMPFS
	.init_fs_context = shmem_init_fs_context,
	.parameters	= &shmem_fs_parameters,
	.parameters	= shmem_fs_parameters,
#else
	.init_fs_context = ramfs_init_fs_context,
	.parameters	= &ramfs_fs_parameters,
	.parameters	= ramfs_fs_parameters,
#endif
	.kill_sb = kill_litter_super,
};
+2 −6
Original line number Diff line number Diff line
@@ -848,7 +848,7 @@ enum {
	Opt_notrim,
};

static const struct fs_parameter_spec rbd_param_specs[] = {
static const struct fs_parameter_spec rbd_parameters[] = {
	fsparam_u32	("alloc_size",			Opt_alloc_size),
	fsparam_flag	("exclusive",			Opt_exclusive),
	fsparam_flag	("lock_on_read",		Opt_lock_on_read),
@@ -863,10 +863,6 @@ static const struct fs_parameter_spec rbd_param_specs[] = {
	{}
};

static const struct fs_parameter_description rbd_parameters = {
	.specs		= rbd_param_specs,
};

struct rbd_options {
	int	queue_depth;
	int	alloc_size;
@@ -6359,7 +6355,7 @@ static int rbd_parse_param(struct fs_parameter *param,
	if (ret != -ENOPARAM)
		return ret;

	token = __fs_parse(&log, &rbd_parameters, param, &result);
	token = __fs_parse(&log, rbd_parameters, param, &result);
	dout("%s fs_parse '%s' token %d\n", __func__, param->key, token);
	if (token < 0) {
		if (token == -ENOPARAM)
Loading