]> Git Repo - linux.git/commit
locking/core: Remove {read,spin,write}_can_lock()
authorWill Deacon <[email protected]>
Tue, 3 Oct 2017 18:25:27 +0000 (19:25 +0100)
committerIngo Molnar <[email protected]>
Tue, 10 Oct 2017 09:50:18 +0000 (11:50 +0200)
commita8a217c22116eff6c120d753c9934089fb229af0
treed56f1283ba7153f9ead9fb92c1a1794143c6e4a3
parent26c4eb192c6224e5297496cead36404b62fb071b
locking/core: Remove {read,spin,write}_can_lock()

Outside of the locking code itself, {read,spin,write}_can_lock() have no
users in tree. Apparmor (the last remaining user of write_can_lock()) got
moved over to lockdep by the previous patch.

This patch removes the use of {read,spin,write}_can_lock() from the
BUILD_LOCK_OPS macro, deferring to the trylock operation for testing the
lock status, and subsequently removes the unused macros altogether. They
aren't guaranteed to work in a concurrent environment and can give
incorrect results in the case of qrwlock.

Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
24 files changed:
arch/alpha/include/asm/spinlock.h
arch/arc/include/asm/spinlock.h
arch/arm/include/asm/spinlock.h
arch/blackfin/include/asm/spinlock.h
arch/hexagon/include/asm/spinlock.h
arch/ia64/include/asm/spinlock.h
arch/m32r/include/asm/spinlock.h
arch/metag/include/asm/spinlock_lnkget.h
arch/metag/include/asm/spinlock_lock1.h
arch/mn10300/include/asm/spinlock.h
arch/parisc/include/asm/spinlock.h
arch/powerpc/include/asm/spinlock.h
arch/s390/include/asm/spinlock.h
arch/sh/include/asm/spinlock-cas.h
arch/sh/include/asm/spinlock-llsc.h
arch/sparc/include/asm/spinlock_32.h
arch/tile/include/asm/spinlock_32.h
arch/tile/include/asm/spinlock_64.h
arch/xtensa/include/asm/spinlock.h
include/asm-generic/qrwlock.h
include/linux/rwlock.h
include/linux/spinlock.h
include/linux/spinlock_up.h
kernel/locking/spinlock.c
This page took 0.089765 seconds and 4 git commands to generate.