Blame SOURCES/0039-fs-ntfs3-Make-mount-option-nohidden-more-universal.patch

Kmods SIG 8b815c
From 9d1939f4575f3fda70dd94542dbd4d775e104132 Mon Sep 17 00:00:00 2001
Kmods SIG 8b815c
From: Kari Argillander <kari.argillander@gmail.com>
Kmods SIG 8b815c
Date: Tue, 7 Sep 2021 18:35:54 +0300
Kmods SIG 8b815c
Subject: [Backport 9d1939f4575f] src: Make mount option nohidden more
Kmods SIG 8b815c
 universal
Kmods SIG 8b815c
MIME-Version: 1.0
Kmods SIG 8b815c
Content-Type: text/plain; charset=UTF-8
Kmods SIG 8b815c
Content-Transfer-Encoding: 8bit
Kmods SIG 8b815c
Kmods SIG 8b815c
If we call Opt_nohidden with just keyword hidden, then we can use
Kmods SIG 8b815c
hidden/nohidden when mounting. We already use this method for almoust
Kmods SIG 8b815c
all other parameters so it is just logical that this will use same
Kmods SIG 8b815c
method.
Kmods SIG 8b815c
Kmods SIG 8b815c
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Kmods SIG 8b815c
Reviewed-by: Christoph Hellwig <hch@lst.de>
Kmods SIG 8b815c
Reviewed-by: Pali Rohár <pali@kernel.org>
Kmods SIG 8b815c
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
Kmods SIG 8b815c
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Kmods SIG 8b815c
---
Kmods SIG 8b815c
 src/super.c | 4 ++--
Kmods SIG 8b815c
 1 file changed, 2 insertions(+), 2 deletions(-)
Kmods SIG 8b815c
Kmods SIG 8b815c
diff --git a/src/super.c b/src/super.c
Kmods SIG 8b815c
index 420cd140917007d9edb3072e19f77c87139f8f20..729ead6f2fac0883b7c1180e45d240f35ba7117b 100644
Kmods SIG 8b815c
--- a/src/super.c
Kmods SIG 8b815c
+++ b/src/super.c
Kmods SIG 8b815c
@@ -242,7 +242,7 @@ static const struct fs_parameter_spec ntfs_fs_parameters[] = {
Kmods SIG 8b815c
 	fsparam_flag_no("discard",		Opt_discard),
Kmods SIG 8b815c
 	fsparam_flag_no("force",		Opt_force),
Kmods SIG 8b815c
 	fsparam_flag_no("sparse",		Opt_sparse),
Kmods SIG 8b815c
-	fsparam_flag("nohidden",		Opt_nohidden),
Kmods SIG 8b815c
+	fsparam_flag_no("hidden",		Opt_nohidden),
Kmods SIG 8b815c
 	fsparam_flag_no("acl",			Opt_acl),
Kmods SIG 8b815c
 	fsparam_flag_no("showmeta",		Opt_showmeta),
Kmods SIG 8b815c
 	fsparam_string("nls",			Opt_nls),
Kmods SIG 8b815c
@@ -331,7 +331,7 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
Kmods SIG 8b815c
 		opts->sparse = result.negated ? 0 : 1;
Kmods SIG 8b815c
 		break;
Kmods SIG 8b815c
 	case Opt_nohidden:
Kmods SIG 8b815c
-		opts->nohidden = 1;
Kmods SIG 8b815c
+		opts->nohidden = result.negated ? 1 : 0;
Kmods SIG 8b815c
 		break;
Kmods SIG 8b815c
 	case Opt_acl:
Kmods SIG 8b815c
 		if (!result.negated)
Kmods SIG 8b815c
-- 
Kmods SIG 8b815c
2.31.1
Kmods SIG 8b815c