linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs_parser: move fsparam_string_empty() helper into header
@ 2024-03-12 10:47 Luis Henriques (SUSE)
  2024-03-12 14:28 ` Christian Brauner
  0 siblings, 1 reply; 2+ messages in thread
From: Luis Henriques (SUSE) @ 2024-03-12 10:47 UTC (permalink / raw)
  To: Christian Brauner, Theodore Ts'o, Andreas Dilger,
	Miklos Szeredi, Amir Goldstein
  Cc: linux-ext4, linux-kernel, linux-unionfs, Luis Henriques (SUSE)

Since both ext4 and overlayfs define the same macro to specify string
parameters that may allow empty values, define it in an header file so
that this helper can be shared.

Signed-off-by: Luis Henriques (SUSE) <luis.henriques@linux.dev>
---
 fs/ext4/super.c           | 4 ----
 fs/overlayfs/params.c     | 4 ----
 include/linux/fs_parser.h | 4 ++++
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a8ba84eabab2..2e5592c87c3a 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1724,10 +1724,6 @@ static const struct constant_table ext4_param_dax[] = {
 	{}
 };
 
-/* String parameter that allows empty argument */
-#define fsparam_string_empty(NAME, OPT) \
-	__fsparam(fs_param_is_string, NAME, OPT, fs_param_can_be_empty, NULL)
-
 /*
  * Mount option specification
  * We don't use fsparam_flag_no because of the way we set the
diff --git a/fs/overlayfs/params.c b/fs/overlayfs/params.c
index 36dcc530ac28..4860fcc4611b 100644
--- a/fs/overlayfs/params.c
+++ b/fs/overlayfs/params.c
@@ -139,10 +139,6 @@ static int ovl_verity_mode_def(void)
 	return OVL_VERITY_OFF;
 }
 
-#define fsparam_string_empty(NAME, OPT) \
-	__fsparam(fs_param_is_string, NAME, OPT, fs_param_can_be_empty, NULL)
-
-
 const struct fs_parameter_spec ovl_parameter_spec[] = {
 	fsparam_string_empty("lowerdir",    Opt_lowerdir),
 	fsparam_string("lowerdir+",         Opt_lowerdir_add),
diff --git a/include/linux/fs_parser.h b/include/linux/fs_parser.h
index 01542c4b87a2..d3350979115f 100644
--- a/include/linux/fs_parser.h
+++ b/include/linux/fs_parser.h
@@ -132,4 +132,8 @@ static inline bool fs_validate_description(const char *name,
 #define fsparam_path(NAME, OPT)	__fsparam(fs_param_is_path, NAME, OPT, 0, NULL)
 #define fsparam_fd(NAME, OPT)	__fsparam(fs_param_is_fd, NAME, OPT, 0, NULL)
 
+/* String parameter that allows empty argument */
+#define fsparam_string_empty(NAME, OPT) \
+	__fsparam(fs_param_is_string, NAME, OPT, fs_param_can_be_empty, NULL)
+
 #endif /* _LINUX_FS_PARSER_H */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs_parser: move fsparam_string_empty() helper into header
  2024-03-12 10:47 [PATCH] fs_parser: move fsparam_string_empty() helper into header Luis Henriques (SUSE)
@ 2024-03-12 14:28 ` Christian Brauner
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Brauner @ 2024-03-12 14:28 UTC (permalink / raw)
  To: Luis Henriques (SUSE)
  Cc: Christian Brauner, linux-ext4, linux-kernel, linux-unionfs,
	Theodore Ts'o, Andreas Dilger, Miklos Szeredi,
	Amir Goldstein

On Tue, 12 Mar 2024 10:47:57 +0000, Luis Henriques (SUSE) wrote:
> Since both ext4 and overlayfs define the same macro to specify string
> parameters that may allow empty values, define it in an header file so
> that this helper can be shared.
> 
> 

Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/1] fs_parser: move fsparam_string_empty() helper into header
      https://git.kernel.org/vfs/vfs/c/39c99a820c4a

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-12 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-12 10:47 [PATCH] fs_parser: move fsparam_string_empty() helper into header Luis Henriques (SUSE)
2024-03-12 14:28 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).