* [PATCH] maple_tree: remove undocumented CONFIG_MAPLE_RCU_DISABLED macro
@ 2026-06-10 22:09 Ethan Nelson-Moore
2026-06-11 0:40 ` SeongJae Park
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ethan Nelson-Moore @ 2026-06-10 22:09 UTC (permalink / raw)
To: Alice Ryhl, Andrew Ballance, maple-tree, linux-mm
Cc: Ethan Nelson-Moore, Liam R. Howlett
<linux/maple_tree.h> consults the macro CONFIG_MAPLE_RCU_DISABLED to
determine whether to disable the mt_in_rcu() function (by making it
always return false). This macro is not reachable via Kconfig, despite
its name, and is not documented anywhere. Remove it to avoid polluting
the CONFIG_* namespace.
Discovered while searching for CONFIG_* symbols referenced in code but
not defined in any Kconfig file.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
include/linux/maple_tree.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h
index 4a5631906aff..1b3014377105 100644
--- a/include/linux/maple_tree.h
+++ b/include/linux/maple_tree.h
@@ -11,7 +11,6 @@
#include <linux/kernel.h>
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
-/* #define CONFIG_MAPLE_RCU_DISABLED */
/*
* Allocated nodes are mutable until they have been inserted into the tree,
@@ -864,9 +863,6 @@ static inline void mt_init(struct maple_tree *mt)
static inline bool mt_in_rcu(struct maple_tree *mt)
{
-#ifdef CONFIG_MAPLE_RCU_DISABLED
- return false;
-#endif
return mt->ma_flags & MT_FLAGS_USE_RCU;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] maple_tree: remove undocumented CONFIG_MAPLE_RCU_DISABLED macro
2026-06-10 22:09 [PATCH] maple_tree: remove undocumented CONFIG_MAPLE_RCU_DISABLED macro Ethan Nelson-Moore
@ 2026-06-11 0:40 ` SeongJae Park
2026-06-11 16:22 ` Liam R. Howlett
2026-06-11 23:00 ` Alice Ryhl
2 siblings, 0 replies; 4+ messages in thread
From: SeongJae Park @ 2026-06-11 0:40 UTC (permalink / raw)
To: Ethan Nelson-Moore
Cc: SeongJae Park, Alice Ryhl, Andrew Ballance, maple-tree, linux-mm,
Liam R. Howlett
On Wed, 10 Jun 2026 15:09:04 -0700 Ethan Nelson-Moore <enelsonmoore@gmail.com> wrote:
> <linux/maple_tree.h> consults the macro CONFIG_MAPLE_RCU_DISABLED to
> determine whether to disable the mt_in_rcu() function (by making it
> always return false). This macro is not reachable via Kconfig, despite
> its name, and is not documented anywhere. Remove it to avoid polluting
> the CONFIG_* namespace.
>
> Discovered while searching for CONFIG_* symbols referenced in code but
> not defined in any Kconfig file.
Seems this was also found in the past [1], and apparently this is not
intended to be as is.
I also think it is better to be removed or renamed.
[1] https://lore.kernel.org/20230906152325.dblzauybyoq5kd35@revolver
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Acked-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] maple_tree: remove undocumented CONFIG_MAPLE_RCU_DISABLED macro
2026-06-10 22:09 [PATCH] maple_tree: remove undocumented CONFIG_MAPLE_RCU_DISABLED macro Ethan Nelson-Moore
2026-06-11 0:40 ` SeongJae Park
@ 2026-06-11 16:22 ` Liam R. Howlett
2026-06-11 23:00 ` Alice Ryhl
2 siblings, 0 replies; 4+ messages in thread
From: Liam R. Howlett @ 2026-06-11 16:22 UTC (permalink / raw)
To: Ethan Nelson-Moore; +Cc: Alice Ryhl, Andrew Ballance, maple-tree, linux-mm
On 26/06/10 03:09PM, Ethan Nelson-Moore wrote:
> <linux/maple_tree.h> consults the macro CONFIG_MAPLE_RCU_DISABLED to
> determine whether to disable the mt_in_rcu() function (by making it
> always return false). This macro is not reachable via Kconfig, despite
> its name, and is not documented anywhere. Remove it to avoid polluting
> the CONFIG_* namespace.
>
> Discovered while searching for CONFIG_* symbols referenced in code but
> not defined in any Kconfig file.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: "Liam R. Howlett (Oracle)" <liam@infradead.org>
> ---
> include/linux/maple_tree.h | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h
> index 4a5631906aff..1b3014377105 100644
> --- a/include/linux/maple_tree.h
> +++ b/include/linux/maple_tree.h
> @@ -11,7 +11,6 @@
> #include <linux/kernel.h>
> #include <linux/rcupdate.h>
> #include <linux/spinlock.h>
> -/* #define CONFIG_MAPLE_RCU_DISABLED */
>
> /*
> * Allocated nodes are mutable until they have been inserted into the tree,
> @@ -864,9 +863,6 @@ static inline void mt_init(struct maple_tree *mt)
>
> static inline bool mt_in_rcu(struct maple_tree *mt)
> {
> -#ifdef CONFIG_MAPLE_RCU_DISABLED
> - return false;
> -#endif
> return mt->ma_flags & MT_FLAGS_USE_RCU;
> }
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] maple_tree: remove undocumented CONFIG_MAPLE_RCU_DISABLED macro
2026-06-10 22:09 [PATCH] maple_tree: remove undocumented CONFIG_MAPLE_RCU_DISABLED macro Ethan Nelson-Moore
2026-06-11 0:40 ` SeongJae Park
2026-06-11 16:22 ` Liam R. Howlett
@ 2026-06-11 23:00 ` Alice Ryhl
2 siblings, 0 replies; 4+ messages in thread
From: Alice Ryhl @ 2026-06-11 23:00 UTC (permalink / raw)
To: Ethan Nelson-Moore; +Cc: Andrew Ballance, maple-tree, linux-mm, Liam R. Howlett
On Wed, Jun 10, 2026 at 03:09:04PM -0700, Ethan Nelson-Moore wrote:
> <linux/maple_tree.h> consults the macro CONFIG_MAPLE_RCU_DISABLED to
> determine whether to disable the mt_in_rcu() function (by making it
> always return false). This macro is not reachable via Kconfig, despite
> its name, and is not documented anywhere. Remove it to avoid polluting
> the CONFIG_* namespace.
>
> Discovered while searching for CONFIG_* symbols referenced in code but
> not defined in any Kconfig file.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-11 23:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 22:09 [PATCH] maple_tree: remove undocumented CONFIG_MAPLE_RCU_DISABLED macro Ethan Nelson-Moore
2026-06-11 0:40 ` SeongJae Park
2026-06-11 16:22 ` Liam R. Howlett
2026-06-11 23:00 ` Alice Ryhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox