locking/ww_mutex: Remove DEFINE_WW_MUTEX() macro
authorWaiman Long <longman@redhat.com>
Thu, 18 Mar 2021 17:28:12 +0000 (13:28 -0400)
committerIngo Molnar <mingo@kernel.org>
Fri, 19 Mar 2021 11:13:10 +0000 (12:13 +0100)
commit5261ced47f8e89173c3b015f6152a05f11a418c3
tree2b9e80d32a0aea99baf8c1d2b50c2b39eff58e8d
parent2ea55bbba23e9d36996299664d618393c8602646
locking/ww_mutex: Remove DEFINE_WW_MUTEX() macro

The current DEFINE_WW_MUTEX() macro fails to properly set up the lockdep
key of the ww_mutexes causing potential circular locking dependency
splat. Though it is possible to add more macro magic to make it work,
but the result is rather ugly.

Since locktorture was the only user of DEFINE_WW_MUTEX() and the
previous commit has just removed its use. It is easier to just remove
the macro to force future users of ww_mutexes to use ww_mutex_init()
for initialization.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210318172814.4400-4-longman@redhat.com
include/linux/ww_mutex.h