summaryrefslogtreecommitdiffstats
path: root/include/linux/seqlock.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-06-11 08:46:46 -0400
committerThomas Gleixner <tglx@linutronix.de>2015-06-18 18:09:56 -0400
commita7c6f571ff51cc77d90dd54968f7c5c938c43998 (patch)
tree8373ff506319a169e213d38bbe779d22588ba546 /include/linux/seqlock.h
parent8edfb0362e8e52dec2de08fa163af01c9da2c9d0 (diff)
seqcount: Rename write_seqcount_barrier()
I'll shortly be introducing another seqcount primitive that's useful to provide ordering semantics and would like to use the write_seqcount_barrier() name for that. Seeing how there's only one user of the current primitive, lets rename it to invalidate, as that appears what its doing. While there, employ lockdep_assert_held() instead of assert_spin_locked() to not generate debug code for regular kernels. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: ktkhai@parallels.com Cc: rostedt@goodmis.org Cc: juri.lelli@gmail.com Cc: pang.xunlei@linaro.org Cc: Oleg Nesterov <oleg@redhat.com> Cc: wanpeng.li@linux.intel.com Cc: Paul McKenney <paulmck@linux.vnet.ibm.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: umgwanakikbuti@gmail.com Link: http://lkml.kernel.org/r/20150611124743.279926217@infradead.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/seqlock.h')
-rw-r--r--include/linux/seqlock.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 5f68d0a391ce..c07e3a536099 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -266,13 +266,13 @@ static inline void write_seqcount_end(seqcount_t *s)
266} 266}
267 267
268/** 268/**
269 * write_seqcount_barrier - invalidate in-progress read-side seq operations 269 * write_seqcount_invalidate - invalidate in-progress read-side seq operations
270 * @s: pointer to seqcount_t 270 * @s: pointer to seqcount_t
271 * 271 *
272 * After write_seqcount_barrier, no read-side seq operations will complete 272 * After write_seqcount_invalidate, no read-side seq operations will complete
273 * successfully and see data older than this. 273 * successfully and see data older than this.
274 */ 274 */
275static inline void write_seqcount_barrier(seqcount_t *s) 275static inline void write_seqcount_invalidate(seqcount_t *s)
276{ 276{
277 smp_wmb(); 277 smp_wmb();
278 s->sequence+=2; 278 s->sequence+=2;