diff options
Diffstat (limited to 'fs/debugfs/inode.c')
| -rw-r--r-- | fs/debugfs/inode.c | 26 | 
1 files changed, 13 insertions, 13 deletions
| diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index dc51df0b118d..91521576f500 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -92,9 +92,9 @@ enum {  };  static const struct fs_parameter_spec debugfs_param_specs[] = { -	fsparam_u32	("gid",		Opt_gid), +	fsparam_gid	("gid",		Opt_gid),  	fsparam_u32oct	("mode",	Opt_mode), -	fsparam_u32	("uid",		Opt_uid), +	fsparam_uid	("uid",		Opt_uid),  	{}  }; @@ -102,26 +102,26 @@ static int debugfs_parse_param(struct fs_context *fc, struct fs_parameter *param  {  	struct debugfs_fs_info *opts = fc->s_fs_info;  	struct fs_parse_result result; -	kuid_t uid; -	kgid_t gid;  	int opt;  	opt = fs_parse(fc, debugfs_param_specs, param, &result); -	if (opt < 0) +	if (opt < 0) { +		/* +                * We might like to report bad mount options here; but +                * traditionally debugfs has ignored all mount options +                */ +		if (opt == -ENOPARAM) +			return 0; +  		return opt; +	}  	switch (opt) {  	case Opt_uid: -		uid = make_kuid(current_user_ns(), result.uint_32); -		if (!uid_valid(uid)) -			return invalf(fc, "Unknown uid"); -		opts->uid = uid; +		opts->uid = result.uid;  		break;  	case Opt_gid: -		gid = make_kgid(current_user_ns(), result.uint_32); -		if (!gid_valid(gid)) -			return invalf(fc, "Unknown gid"); -		opts->gid = gid; +		opts->gid = result.gid;  		break;  	case Opt_mode:  		opts->mode = result.uint_32 & S_IALLUGO; |