From: Eric Sandeen Date: Fri, 28 Jun 2024 00:36:14 +0000 (-0500) Subject: isofs: Convert to new uid/gid option parsing helpers X-Git-Tag: v6.11-rc1~238^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a265845db285bb90d29d0f223176ae2fdd422d2;p=thirdparty%2Fkernel%2Flinux.git isofs: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/3e57caa1-33e0-4456-8e07-60922439e479@redhat.com Signed-off-by: Christian Brauner --- diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 93b1077a380a8..ed548efdd9bbc 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -326,8 +326,8 @@ static const struct fs_parameter_spec isofs_param_spec[] = { fsparam_u32 ("session", Opt_session), fsparam_u32 ("sbsector", Opt_sb), fsparam_enum ("check", Opt_check, isofs_param_check), - fsparam_u32 ("uid", Opt_uid), - fsparam_u32 ("gid", Opt_gid), + fsparam_uid ("uid", Opt_uid), + fsparam_gid ("gid", Opt_gid), /* Note: mode/dmode historically accepted %u not strictly %o */ fsparam_u32 ("mode", Opt_mode), fsparam_u32 ("dmode", Opt_dmode), @@ -344,8 +344,6 @@ static int isofs_parse_param(struct fs_context *fc, struct isofs_options *popt = fc->fs_private; struct fs_parse_result result; int opt; - kuid_t uid; - kgid_t gid; unsigned int n; /* There are no remountable options */ @@ -409,17 +407,11 @@ static int isofs_parse_param(struct fs_context *fc, case Opt_ignore: break; case Opt_uid: - uid = make_kuid(current_user_ns(), result.uint_32); - if (!uid_valid(uid)) - return -EINVAL; - popt->uid = uid; + popt->uid = result.uid; popt->uid_set = 1; break; case Opt_gid: - gid = make_kgid(current_user_ns(), result.uint_32); - if (!gid_valid(gid)) - return -EINVAL; - popt->gid = gid; + popt->gid = result.gid; popt->gid_set = 1; break; case Opt_mode: