]> git.baikalelectronics.ru Git - kernel.git/commit
locking/rwbase: Extract __rwbase_write_trylock()
authorPeter Zijlstra <peterz@infradead.org>
Thu, 9 Sep 2021 10:59:18 +0000 (12:59 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 15 Sep 2021 15:49:15 +0000 (17:49 +0200)
commit2e03e1980d93b6a01aca8e3f37566b5c22f14546
tree0f2ddfc328c5bdd742604e2c2fe14f3926d82dd7
parentb1e9981a1fc62598c0a0efd0db63536a70dd89fb
locking/rwbase: Extract __rwbase_write_trylock()

The code in rwbase_write_lock() is a little non-obvious vs the
read+set 'trylock', extract the sequence into a helper function to
clarify the code.

This also provides a single site to fix fast-path ordering.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/YUCq3L+u44NDieEJ@hirez.programming.kicks-ass.net
kernel/locking/rwbase_rt.c