rcu: Change rcu_dereference_check(c) to check "c" first

Change the order of "c" and "_held" checks in rcu_dereference_check(),
this can help if __builtin_constant_p(c).

CONFIG_DEBUG_LOCK_ALLOC + CONFIG_PROVE_RCU + CONFIG_TREE_RCU_TRACE

	- 5578795 3026776 14757888 23363459
	+ 5542443 3014040 14757888 23314371

saves 49088 bytes according to size vmlinux.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2 files changed