Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rcupdate: remove dead code

DEBUG_OBJECTS_RCU_HEAD depends on PREEMPT, so #ifndef CONFIG_PREEMPT
is totally useless in kernel/rcupdate.c.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

authored by

Amerigo Wang and committed by
Paul E. McKenney
fe8e6407 fea65126

-5
-5
kernel/rcupdate.c
··· 215 215 * If we detect that we are nested in a RCU read-side critical 216 216 * section, we should simply fail, otherwise we would deadlock. 217 217 */ 218 - #ifndef CONFIG_PREEMPT 219 - WARN_ON(1); 220 - return 0; 221 - #else 222 218 if (rcu_preempt_depth() != 0 || preempt_count() != 0 || 223 219 irqs_disabled()) { 224 220 WARN_ON(1); ··· 225 229 rcu_barrier_bh(); 226 230 debug_object_free(head, &rcuhead_debug_descr); 227 231 return 1; 228 - #endif 229 232 default: 230 233 return 0; 231 234 }