Skip to content

Commit c449cb5

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

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

fs/ntfs3/super.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ enum Opt {
259259

260260
// clang-format off
261261
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),
264264
fsparam_u32oct("umask", Opt_umask),
265265
fsparam_u32oct("dmask", Opt_dmask),
266266
fsparam_u32oct("fmask", Opt_fmask),
@@ -319,14 +319,10 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
319319

320320
switch (opt) {
321321
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;
325323
break;
326324
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;
330326
break;
331327
case Opt_umask:
332328
if (result.uint_32 & ~07777)

0 commit comments

Comments
 (0)