From 0be0af94546c42f218d1ef3a23903e318311babe Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 6 Feb 2008 01:37:25 -0800 Subject: [PATCH] --- yaml --- r: 83440 b: refs/heads/master c: d99c4f6b13b3149bc83703ab1493beaeaaaf8a2d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/rcupdate.h | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 05fdc5eacd92..5fa8050b42f5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ba6f867f114760d4e43f0f93abe280ee0a0d696e +refs/heads/master: d99c4f6b13b3149bc83703ab1493beaeaaaf8a2d diff --git a/trunk/include/linux/rcupdate.h b/trunk/include/linux/rcupdate.h index d32c14de270e..37a642c54871 100644 --- a/trunk/include/linux/rcupdate.h +++ b/trunk/include/linux/rcupdate.h @@ -174,10 +174,13 @@ struct rcu_head { * code. */ -#define rcu_assign_pointer(p, v) ({ \ - smp_wmb(); \ - (p) = (v); \ - }) +#define rcu_assign_pointer(p, v) \ + ({ \ + if (!__builtin_constant_p(v) || \ + ((v) != NULL)) \ + smp_wmb(); \ + (p) = (v); \ + }) /** * synchronize_sched - block until all CPUs have exited any non-preemptive