Skip to content

Commit 6a26584

Browse files
Eric Sandeenbrauner
authored andcommitted
isofs: 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 eefc132 commit 6a26584

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

fs/isofs/inode.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ static const struct fs_parameter_spec isofs_param_spec[] = {
326326
fsparam_u32 ("session", Opt_session),
327327
fsparam_u32 ("sbsector", Opt_sb),
328328
fsparam_enum ("check", Opt_check, isofs_param_check),
329-
fsparam_u32 ("uid", Opt_uid),
330-
fsparam_u32 ("gid", Opt_gid),
329+
fsparam_uid ("uid", Opt_uid),
330+
fsparam_gid ("gid", Opt_gid),
331331
/* Note: mode/dmode historically accepted %u not strictly %o */
332332
fsparam_u32 ("mode", Opt_mode),
333333
fsparam_u32 ("dmode", Opt_dmode),
@@ -344,8 +344,6 @@ static int isofs_parse_param(struct fs_context *fc,
344344
struct isofs_options *popt = fc->fs_private;
345345
struct fs_parse_result result;
346346
int opt;
347-
kuid_t uid;
348-
kgid_t gid;
349347
unsigned int n;
350348

351349
/* There are no remountable options */
@@ -409,17 +407,11 @@ static int isofs_parse_param(struct fs_context *fc,
409407
case Opt_ignore:
410408
break;
411409
case Opt_uid:
412-
uid = make_kuid(current_user_ns(), result.uint_32);
413-
if (!uid_valid(uid))
414-
return -EINVAL;
415-
popt->uid = uid;
410+
popt->uid = result.uid;
416411
popt->uid_set = 1;
417412
break;
418413
case Opt_gid:
419-
gid = make_kgid(current_user_ns(), result.uint_32);
420-
if (!gid_valid(gid))
421-
return -EINVAL;
422-
popt->gid = gid;
414+
popt->gid = result.gid;
423415
popt->gid_set = 1;
424416
break;
425417
case Opt_mode:

0 commit comments

Comments
 (0)