@@ -41,8 +41,8 @@ enum { opt_nls, opt_uid, opt_gid, opt_ttl, opt_dmode, opt_fmode,
41
41
42
42
static const struct fs_parameter_spec vboxsf_fs_parameters [] = {
43
43
fsparam_string ("nls" , opt_nls ),
44
- fsparam_u32 ("uid" , opt_uid ),
45
- fsparam_u32 ("gid" , opt_gid ),
44
+ fsparam_uid ("uid" , opt_uid ),
45
+ fsparam_gid ("gid" , opt_gid ),
46
46
fsparam_u32 ("ttl" , opt_ttl ),
47
47
fsparam_u32oct ("dmode" , opt_dmode ),
48
48
fsparam_u32oct ("fmode" , opt_fmode ),
@@ -55,8 +55,6 @@ static int vboxsf_parse_param(struct fs_context *fc, struct fs_parameter *param)
55
55
{
56
56
struct vboxsf_fs_context * ctx = fc -> fs_private ;
57
57
struct fs_parse_result result ;
58
- kuid_t uid ;
59
- kgid_t gid ;
60
58
int opt ;
61
59
62
60
opt = fs_parse (fc , vboxsf_fs_parameters , param , & result );
@@ -73,16 +71,10 @@ static int vboxsf_parse_param(struct fs_context *fc, struct fs_parameter *param)
73
71
param -> string = NULL ;
74
72
break ;
75
73
case opt_uid :
76
- uid = make_kuid (current_user_ns (), result .uint_32 );
77
- if (!uid_valid (uid ))
78
- return - EINVAL ;
79
- ctx -> o .uid = uid ;
74
+ ctx -> o .uid = result .uid ;
80
75
break ;
81
76
case opt_gid :
82
- gid = make_kgid (current_user_ns (), result .uint_32 );
83
- if (!gid_valid (gid ))
84
- return - EINVAL ;
85
- ctx -> o .gid = gid ;
77
+ ctx -> o .gid = result .gid ;
86
78
break ;
87
79
case opt_ttl :
88
80
ctx -> o .ttl = msecs_to_jiffies (result .uint_32 );
0 commit comments