Skip to content

Commit 568f114

Browse files
fs/ntfs3: Replace fsparam_flag_no -> fsparam_flag
Based on the experience with an error related to incorrect parsing of the 'nocase' option, I decided to simplify the list and type of parameters. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent 6b39bfa commit 568f114

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

fs/ntfs3/super.c

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

260260
// clang-format off
261261
static const struct fs_parameter_spec ntfs_fs_parameters[] = {
262-
fsparam_uid("uid", Opt_uid),
263-
fsparam_gid("gid", Opt_gid),
264-
fsparam_u32oct("umask", Opt_umask),
265-
fsparam_u32oct("dmask", Opt_dmask),
266-
fsparam_u32oct("fmask", Opt_fmask),
267-
fsparam_flag_no("sys_immutable", Opt_immutable),
268-
fsparam_flag_no("discard", Opt_discard),
269-
fsparam_flag_no("force", Opt_force),
270-
fsparam_flag_no("sparse", Opt_sparse),
271-
fsparam_flag_no("hidden", Opt_nohidden),
272-
fsparam_flag_no("hide_dot_files", Opt_hide_dot_files),
273-
fsparam_flag_no("windows_names", Opt_windows_names),
274-
fsparam_flag_no("showmeta", Opt_showmeta),
275-
fsparam_flag_no("acl", Opt_acl),
276-
fsparam_string("iocharset", Opt_iocharset),
277-
fsparam_flag_no("prealloc", Opt_prealloc),
278-
fsparam_flag_no("case", Opt_nocase),
262+
fsparam_uid("uid", Opt_uid),
263+
fsparam_gid("gid", Opt_gid),
264+
fsparam_u32oct("umask", Opt_umask),
265+
fsparam_u32oct("dmask", Opt_dmask),
266+
fsparam_u32oct("fmask", Opt_fmask),
267+
fsparam_flag("sys_immutable", Opt_immutable),
268+
fsparam_flag("discard", Opt_discard),
269+
fsparam_flag("force", Opt_force),
270+
fsparam_flag("sparse", Opt_sparse),
271+
fsparam_flag("nohidden", Opt_nohidden),
272+
fsparam_flag("hide_dot_files", Opt_hide_dot_files),
273+
fsparam_flag("windows_names", Opt_windows_names),
274+
fsparam_flag("showmeta", Opt_showmeta),
275+
fsparam_flag("acl", Opt_acl),
276+
fsparam_string("iocharset", Opt_iocharset),
277+
fsparam_flag("prealloc", Opt_prealloc),
278+
fsparam_flag("nocase", Opt_nocase),
279279
{}
280280
};
281281
// clang-format on
@@ -345,28 +345,28 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
345345
opts->fmask = 1;
346346
break;
347347
case Opt_immutable:
348-
opts->sys_immutable = result.negated ? 0 : 1;
348+
opts->sys_immutable = 1;
349349
break;
350350
case Opt_discard:
351-
opts->discard = result.negated ? 0 : 1;
351+
opts->discard = 1;
352352
break;
353353
case Opt_force:
354-
opts->force = result.negated ? 0 : 1;
354+
opts->force = 1;
355355
break;
356356
case Opt_sparse:
357-
opts->sparse = result.negated ? 0 : 1;
357+
opts->sparse = 1;
358358
break;
359359
case Opt_nohidden:
360-
opts->nohidden = result.negated ? 1 : 0;
360+
opts->nohidden = 1;
361361
break;
362362
case Opt_hide_dot_files:
363-
opts->hide_dot_files = result.negated ? 0 : 1;
363+
opts->hide_dot_files = 1;
364364
break;
365365
case Opt_windows_names:
366-
opts->windows_names = result.negated ? 0 : 1;
366+
opts->windows_names = 1;
367367
break;
368368
case Opt_showmeta:
369-
opts->showmeta = result.negated ? 0 : 1;
369+
opts->showmeta = 1;
370370
break;
371371
case Opt_acl:
372372
if (!result.negated)
@@ -385,10 +385,10 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
385385
param->string = NULL;
386386
break;
387387
case Opt_prealloc:
388-
opts->prealloc = result.negated ? 0 : 1;
388+
opts->prealloc = 1;
389389
break;
390390
case Opt_nocase:
391-
opts->nocase = result.negated ? 1 : 0;
391+
opts->nocase = 1;
392392
break;
393393
default:
394394
/* Should not be here unless we forget add case. */

0 commit comments

Comments
 (0)