linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib/test_vmalloc.c: Fix compile error with CONFIG_TINY_RCU
@ 2025-04-20 14:20 Uladzislau Rezki (Sony)
  2025-04-20 20:30 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Uladzislau Rezki (Sony) @ 2025-04-20 14:20 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, LKML, Baoquan He, Christoph Hellwig, Uladzislau Rezki,
	Oleksiy Avramchenko, kernel test robot

When the kernel is built with CONFIG_TINY_RCU, compiling the
test_vmalloc.c fails, due to conflicting definitions like
"struct srcu_usage", etc. between "srcutiny.h" and "srcutree.h".

It happens because of direct including the "srcutree.h" bypassing
the automatic selection mechanism. A correct approach is to include
a generic <linux/srcu.h> which properly select SRCU implementation
based on a kernel configuration.

Fix it by replacing the "srcutree.h" include with "srcu.h".

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202504190717.tJHs381f-lkp@intel.com/
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
 lib/test_vmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c
index 6d65ef725d42c..1b0b59549aaf1 100644
--- a/lib/test_vmalloc.c
+++ b/lib/test_vmalloc.c
@@ -15,7 +15,7 @@
 #include <linux/delay.h>
 #include <linux/mm.h>
 #include <linux/rcupdate.h>
-#include <linux/srcutree.h>
+#include <linux/srcu.h>
 #include <linux/slab.h>
 
 #define __param(type, name, init, msg)		\
-- 
2.39.5



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

end of thread, other threads:[~2025-04-20 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-20 14:20 [PATCH] lib/test_vmalloc.c: Fix compile error with CONFIG_TINY_RCU Uladzislau Rezki (Sony)
2025-04-20 20:30 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox