Messages in this thread |  | | From | Lance Roy <> | Subject | Using lockdep instead of spin_is_locked() | Date | Tue, 2 Oct 2018 22:38:46 -0700 |
| |
One of the main uses of spin_is_locked() is to require that a lock is held when a function is called, for debugging, but lockdep_assert_held() is better for this purpose since it won't make a mistake when someone else is holding the lock. This patch series replaces all of this kind of use of spin_is_locked() with calls to lockdep_assert_held(). An ulterior motive is to reduce the number of uses of spin_is_locked() from the kernel, to work towards possibly eliminating it.
Thanks, Lance
arch/x86/pci/i386.c | 2 +- drivers/hv/hv_balloon.c | 2 +- drivers/misc/sgi-xp/xpc_channel.c | 6 +++--- drivers/misc/sgi-xp/xpc_sn2.c | 2 +- drivers/misc/sgi-xp/xpc_uv.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- drivers/net/ethernet/intel/igbvf/mbx.c | 4 ++-- drivers/net/ethernet/sfc/efx.c | 2 +- drivers/net/ethernet/smsc/smsc911x.h | 2 +- drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 +- drivers/scsi/snic/snic_scsi.c | 4 ++-- fs/userfaultfd.c | 2 +- kernel/futex.c | 4 ++-- kernel/locking/mutex-debug.c | 4 ++-- mm/khugepaged.c | 4 ++-- mm/swap.c | 3 +-- net/netfilter/ipset/ip_set_hash_gen.h | 2 +- security/apparmor/file.c | 2 +- virt/kvm/arm/vgic/vgic.c | 12 ++++++------ 19 files changed, 31 insertions(+), 33 deletions(-)
|  |