locking/rwsem: Pass the current atomic count to rwsem_down_read_slowpath()
authorWaiman Long <longman@redhat.com>
Sat, 21 Nov 2020 04:14:12 +0000 (23:14 -0500)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 9 Dec 2020 16:08:47 +0000 (17:08 +0100)
commitc8fe8b0564388f41147326f31e4587171aacccd4
treeda3fb2f70ad4d542f0260c8115842bb97e651a65
parentc995e638ccbbc65a76d1713c4fdcf927e7e2cb83
locking/rwsem: Pass the current atomic count to rwsem_down_read_slowpath()

The atomic count value right after reader count increment can be useful
to determine the rwsem state at trylock time. So the count value is
passed down to rwsem_down_read_slowpath() to be used when appropriate.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Davidlohr Bueso <dbueso@suse.de>
Link: https://lkml.kernel.org/r/20201121041416.12285-2-longman@redhat.com
kernel/locking/rwsem.c