Skip to content

Commit dcffad3

Browse files
Eric Sandeenbrauner
authored andcommitted
efivarfs: Convert to new uid/gid option parsing helpers
Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 49abee5 commit dcffad3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

fs/efivarfs/super.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ enum {
275275
};
276276

277277
static const struct fs_parameter_spec efivarfs_parameters[] = {
278-
fsparam_u32("uid", Opt_uid),
279-
fsparam_u32("gid", Opt_gid),
278+
fsparam_uid("uid", Opt_uid),
279+
fsparam_gid("gid", Opt_gid),
280280
{},
281281
};
282282

@@ -293,14 +293,10 @@ static int efivarfs_parse_param(struct fs_context *fc, struct fs_parameter *para
293293

294294
switch (opt) {
295295
case Opt_uid:
296-
opts->uid = make_kuid(current_user_ns(), result.uint_32);
297-
if (!uid_valid(opts->uid))
298-
return -EINVAL;
296+
opts->uid = result.uid;
299297
break;
300298
case Opt_gid:
301-
opts->gid = make_kgid(current_user_ns(), result.uint_32);
302-
if (!gid_valid(opts->gid))
303-
return -EINVAL;
299+
opts->gid = result.gid;
304300
break;
305301
default:
306302
return -EINVAL;

0 commit comments

Comments
 (0)