On Wed, Oct 31, 2012 at 11:00:17AM -0700, Peter Fordham wrote:
I guess what I'm saying is that isn't it up to the calling code to decide exactly how this should be done rather than the locking code.
Please read the documentation on locking. See the section labelled "LOCKING FUNCTIONS" in Documentation/memory-barriers.txt.
This details the requirements of the locking functions that the kernel requires for correct operation.