diff options
author | Eric Sandeen <sandeen@redhat.com> | 2024-06-28 03:36:14 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-07-02 07:21:19 +0300 |
commit | 6a265845db285bb90d29d0f223176ae2fdd422d2 (patch) | |
tree | 5e7eb160caee4e97ac12db4c9f8be82ce4fbc78a /fs/isofs/inode.c | |
parent | eefc132477226c54796cd5dafc1ddf1850b8ba90 (diff) | |
download | linux-6a265845db285bb90d29d0f223176ae2fdd422d2.tar.xz |
isofs: Convert to new uid/gid option parsing helpers
Convert to new uid/gid option parsing helpers
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Link: https://lore.kernel.org/r/3e57caa1-33e0-4456-8e07-60922439e479@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/isofs/inode.c')
-rw-r--r-- | fs/isofs/inode.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 93b1077a380a..ed548efdd9bb 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: |