From: Lai Jiangshan Date: Thu, 29 Nov 2012 08:46:09 +0000 (+0800) Subject: srcu: use ACCESS_ONCE() to access sp->completed in srcu_read_lock() X-Git-Tag: v3.9-rc1~175^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a6b55e7108b3476d13ee9501ec69dbe1605d774;p=pandora-kernel.git srcu: use ACCESS_ONCE() to access sp->completed in srcu_read_lock() The old SRCU implementation loads sp->completed within an RCU-sched section, courtesy of preempt_disable(). This was required due to the use of synchronize_sched() in the old implemenation's synchronize_srcu(). However, the new implementation does not rely on synchronize_sched(), so it in turn does not require the load of sp->completed and the ->c[] counter to be in a single preempt-disabled region of code. This commit therefore moves the sp->completed access outside of the preempt-disabled region and applies ACCESS_ONCE(). The resulting code is almost as the same as before, but it removes the now-misleading rcu_dereference_index_check() call. Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney --- Reading git-diff-tree failed