Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eric Sandeen and committed by
Christian Brauner
6a265845 eefc1324

+4 -12
+4 -12
fs/isofs/inode.c
··· 326 326 fsparam_u32 ("session", Opt_session), 327 327 fsparam_u32 ("sbsector", Opt_sb), 328 328 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), 331 331 /* Note: mode/dmode historically accepted %u not strictly %o */ 332 332 fsparam_u32 ("mode", Opt_mode), 333 333 fsparam_u32 ("dmode", Opt_dmode), ··· 344 344 struct isofs_options *popt = fc->fs_private; 345 345 struct fs_parse_result result; 346 346 int opt; 347 - kuid_t uid; 348 - kgid_t gid; 349 347 unsigned int n; 350 348 351 349 /* There are no remountable options */ ··· 407 409 case Opt_ignore: 408 410 break; 409 411 case Opt_uid: 410 - uid = make_kuid(current_user_ns(), result.uint_32); 411 - if (!uid_valid(uid)) 412 - return -EINVAL; 413 - popt->uid = uid; 412 + popt->uid = result.uid; 414 413 popt->uid_set = 1; 415 414 break; 416 415 case Opt_gid: 417 - gid = make_kgid(current_user_ns(), result.uint_32); 418 - if (!gid_valid(gid)) 419 - return -EINVAL; 420 - popt->gid = gid; 416 + popt->gid = result.gid; 421 417 popt->gid_set = 1; 422 418 break; 423 419 case Opt_mode: