mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
fs/ntfs3: allow explicit boolean acl/prealloc mount options
This patch improves mount option parsing by allowing explicit boolean values for acl and prealloc. Previously those options were exposed only as presence/absence flags. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
parent
b2bc7c44ed
commit
3c6248937f
|
|
@ -264,8 +264,10 @@ enum Opt {
|
|||
Opt_windows_names,
|
||||
Opt_showmeta,
|
||||
Opt_acl,
|
||||
Opt_acl_bool,
|
||||
Opt_iocharset,
|
||||
Opt_prealloc,
|
||||
Opt_prealloc_bool,
|
||||
Opt_nocase,
|
||||
Opt_err,
|
||||
};
|
||||
|
|
@ -285,9 +287,11 @@ static const struct fs_parameter_spec ntfs_fs_parameters[] = {
|
|||
fsparam_flag("hide_dot_files", Opt_hide_dot_files),
|
||||
fsparam_flag("windows_names", Opt_windows_names),
|
||||
fsparam_flag("showmeta", Opt_showmeta),
|
||||
fsparam_flag_no("acl", Opt_acl),
|
||||
fsparam_flag("acl", Opt_acl),
|
||||
fsparam_bool("acl", Opt_acl_bool),
|
||||
fsparam_string("iocharset", Opt_iocharset),
|
||||
fsparam_flag_no("prealloc", Opt_prealloc),
|
||||
fsparam_flag("prealloc", Opt_prealloc),
|
||||
fsparam_bool("prealloc", Opt_prealloc_bool),
|
||||
fsparam_flag("nocase", Opt_nocase),
|
||||
{}
|
||||
};
|
||||
|
|
@ -379,15 +383,16 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
|
|||
case Opt_showmeta:
|
||||
opts->showmeta = 1;
|
||||
break;
|
||||
case Opt_acl:
|
||||
if (!result.negated)
|
||||
case Opt_acl_bool:
|
||||
if (result.boolean) {
|
||||
case Opt_acl:
|
||||
#ifdef CONFIG_NTFS3_FS_POSIX_ACL
|
||||
fc->sb_flags |= SB_POSIXACL;
|
||||
#else
|
||||
return invalf(
|
||||
fc, "ntfs3: Support for ACL not compiled in!");
|
||||
#endif
|
||||
else
|
||||
} else
|
||||
fc->sb_flags &= ~SB_POSIXACL;
|
||||
break;
|
||||
case Opt_iocharset:
|
||||
|
|
@ -396,7 +401,10 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
|
|||
param->string = NULL;
|
||||
break;
|
||||
case Opt_prealloc:
|
||||
opts->prealloc = !result.negated;
|
||||
opts->prealloc = 1;
|
||||
break;
|
||||
case Opt_prealloc_bool:
|
||||
opts->prealloc = result.boolean;
|
||||
break;
|
||||
case Opt_nocase:
|
||||
opts->nocase = 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user