Skip to content

Commit 16b3dbf

Browse files
fs/ntfs3: Add missed "nocase" in ntfs_show_options
Sort processing ntfs3's mount options in same order they declared. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent 96de65a commit 16b3dbf

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

fs/ntfs3/super.c

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,11 @@ static const struct fs_parameter_spec ntfs_fs_parameters[] = {
270270
fsparam_flag_no("hidden", Opt_nohidden),
271271
fsparam_flag_no("hide_dot_files", Opt_hide_dot_files),
272272
fsparam_flag_no("windows_names", Opt_windows_names),
273-
fsparam_flag_no("acl", Opt_acl),
274273
fsparam_flag_no("showmeta", Opt_showmeta),
274+
fsparam_flag_no("acl", Opt_acl),
275+
fsparam_string("iocharset", Opt_iocharset),
275276
fsparam_flag_no("prealloc", Opt_prealloc),
276277
fsparam_flag_no("nocase", Opt_nocase),
277-
fsparam_string("iocharset", Opt_iocharset),
278278
{}
279279
};
280280

@@ -364,6 +364,9 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
364364
case Opt_windows_names:
365365
opts->windows_names = result.negated ? 0 : 1;
366366
break;
367+
case Opt_showmeta:
368+
opts->showmeta = result.negated ? 0 : 1;
369+
break;
367370
case Opt_acl:
368371
if (!result.negated)
369372
#ifdef CONFIG_NTFS3_FS_POSIX_ACL
@@ -375,9 +378,6 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
375378
else
376379
fc->sb_flags &= ~SB_POSIXACL;
377380
break;
378-
case Opt_showmeta:
379-
opts->showmeta = result.negated ? 0 : 1;
380-
break;
381381
case Opt_iocharset:
382382
kfree(opts->nls_name);
383383
opts->nls_name = param->string;
@@ -547,34 +547,36 @@ static int ntfs_show_options(struct seq_file *m, struct dentry *root)
547547

548548
seq_printf(m, ",uid=%u", from_kuid_munged(user_ns, opts->fs_uid));
549549
seq_printf(m, ",gid=%u", from_kgid_munged(user_ns, opts->fs_gid));
550-
if (opts->fmask)
551-
seq_printf(m, ",fmask=%04o", opts->fs_fmask_inv ^ 0xffff);
552550
if (opts->dmask)
553551
seq_printf(m, ",dmask=%04o", opts->fs_dmask_inv ^ 0xffff);
554-
if (opts->nls)
555-
seq_printf(m, ",iocharset=%s", opts->nls->charset);
556-
else
557-
seq_puts(m, ",iocharset=utf8");
552+
if (opts->fmask)
553+
seq_printf(m, ",fmask=%04o", opts->fs_fmask_inv ^ 0xffff);
558554
if (opts->sys_immutable)
559555
seq_puts(m, ",sys_immutable");
560556
if (opts->discard)
561557
seq_puts(m, ",discard");
558+
if (opts->force)
559+
seq_puts(m, ",force");
562560
if (opts->sparse)
563561
seq_puts(m, ",sparse");
564-
if (opts->showmeta)
565-
seq_puts(m, ",showmeta");
566562
if (opts->nohidden)
567563
seq_puts(m, ",nohidden");
568-
if (opts->windows_names)
569-
seq_puts(m, ",windows_names");
570564
if (opts->hide_dot_files)
571565
seq_puts(m, ",hide_dot_files");
572-
if (opts->force)
573-
seq_puts(m, ",force");
574-
if (opts->prealloc)
575-
seq_puts(m, ",prealloc");
566+
if (opts->windows_names)
567+
seq_puts(m, ",windows_names");
568+
if (opts->showmeta)
569+
seq_puts(m, ",showmeta");
576570
if (sb->s_flags & SB_POSIXACL)
577571
seq_puts(m, ",acl");
572+
if (opts->nls)
573+
seq_printf(m, ",iocharset=%s", opts->nls->charset);
574+
else
575+
seq_puts(m, ",iocharset=utf8");
576+
if (opts->prealloc)
577+
seq_puts(m, ",prealloc");
578+
if (opts->nocase)
579+
seq_puts(m, ",nocase");
578580

579581
return 0;
580582
}

0 commit comments

Comments
 (0)