rcu: Fix sparse warning for rcu_expedited from kernel/ksysfs.c
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Tue, 11 Feb 2014 21:10:12 +0000 (16:10 -0500)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 26 Feb 2014 14:35:16 +0000 (06:35 -0800)
This commit fixes the follwoing warning:

kernel/ksysfs.c:143:5: warning: symbol 'rcu_expedited' was not declared. Should it be static?

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
[ paulmck: Moved the declaration to include/linux/rcupdate.h to avoid
   including the RCU-internal rcu.h file outside of RCU. ]
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
include/linux/rcupdate.h
kernel/ksysfs.c
kernel/rcu/rcu.h

index 32decf1a9c6c5333922bb9802a7d33190b1c1322..f3706c6b2e21798109e91a7de723118607e019cc 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/compiler.h>
 #include <asm/barrier.h>
 
+extern int rcu_expedited; /* for sysctl */
 #ifdef CONFIG_RCU_TORTURE_TEST
 extern int rcutorture_runnable; /* for sysctl */
 #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
index d945a949760f0ec4a9fd09313e30fb5f651bc39a..e660964086e2e46d1066e143d29c21887f712d5d 100644 (file)
@@ -19,6 +19,8 @@
 #include <linux/sched.h>
 #include <linux/capability.h>
 
+#include <linux/rcupdate.h>    /* rcu_expedited */
+
 #define KERNEL_ATTR_RO(_name) \
 static struct kobj_attribute _name##_attr = __ATTR_RO(_name)
 
index 1bd787fddcb2d138e1a00e52f20a87c593acbfa8..af2e60a8425d1553d717ec93c69a7840eb05b3f4 100644 (file)
@@ -116,8 +116,6 @@ static inline bool __rcu_reclaim(const char *rn, struct rcu_head *head)
        }
 }
 
-extern int rcu_expedited;
-
 #ifdef CONFIG_RCU_STALL_COMMON
 
 extern int rcu_cpu_stall_suppress;