Skip to content

Commit 822175e

Browse files
laijspaulmckrcu
authored andcommitted
rcu: Fix harmless omission of "CONFIG_" from #if condition
The C preprocessor macros SRCU and TINY_RCU should instead be CONFIG_SRCU and CONFIG_TINY_RCU, respectively in the #f in kernel/rcu/rcu.h. But there is no harm when "TINY_RCU" is wrongly used, which are always non-defined, which makes "!defined(TINY_RCU)" always true, which means the code block is always included, and the included code block doesn't cause any compilation error so far in CONFIG_TINY_RCU builds. It is also the reason this change should not be taken in -stable. This commit adds the needed "CONFIG_" prefix to both macros. Not for -stable. Signed-off-by: Lai Jiangshan <[email protected]> Signed-off-by: Lai Jiangshan <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent c30fe54 commit 822175e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/rcu/rcu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ void rcu_test_sync_prims(void);
281281
*/
282282
extern void resched_cpu(int cpu);
283283

284-
#if defined(SRCU) || !defined(TINY_RCU)
284+
#if defined(CONFIG_SRCU) || !defined(CONFIG_TINY_RCU)
285285

286286
#include <linux/rcu_node_tree.h>
287287

@@ -418,7 +418,7 @@ do { \
418418
#define raw_lockdep_assert_held_rcu_node(p) \
419419
lockdep_assert_held(&ACCESS_PRIVATE(p, lock))
420420

421-
#endif /* #if defined(SRCU) || !defined(TINY_RCU) */
421+
#endif /* #if defined(CONFIG_SRCU) || !defined(CONFIG_TINY_RCU) */
422422

423423
#ifdef CONFIG_SRCU
424424
void srcu_init(void);

0 commit comments

Comments
 (0)