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

ntfs3: 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/04bf30db-8542-48dc-9060-7f7dc08eda22@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Eric Sandeen and committed by
Christian Brauner
c449cb5d 6a265845

+4 -8
+4 -8
fs/ntfs3/super.c
··· 259 259 260 260 // clang-format off 261 261 static const struct fs_parameter_spec ntfs_fs_parameters[] = { 262 - fsparam_u32("uid", Opt_uid), 263 - fsparam_u32("gid", Opt_gid), 262 + fsparam_uid("uid", Opt_uid), 263 + fsparam_gid("gid", Opt_gid), 264 264 fsparam_u32oct("umask", Opt_umask), 265 265 fsparam_u32oct("dmask", Opt_dmask), 266 266 fsparam_u32oct("fmask", Opt_fmask), ··· 319 319 320 320 switch (opt) { 321 321 case Opt_uid: 322 - opts->fs_uid = make_kuid(current_user_ns(), result.uint_32); 323 - if (!uid_valid(opts->fs_uid)) 324 - return invalf(fc, "ntfs3: Invalid value for uid."); 322 + opts->fs_uid = result.uid; 325 323 break; 326 324 case Opt_gid: 327 - opts->fs_gid = make_kgid(current_user_ns(), result.uint_32); 328 - if (!gid_valid(opts->fs_gid)) 329 - return invalf(fc, "ntfs3: Invalid value for gid."); 325 + opts->fs_gid = result.gid; 330 326 break; 331 327 case Opt_umask: 332 328 if (result.uint_32 & ~07777)