ASSERT(!spin_is_locked()) doesn't work on UP builds. Replace with a standard lockdep_assert_held() Cc: xfs-masters@xxxxxxxxxxx Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx> -- fs/xfs/xfs_iget.c | 4
And the problem with that is what? There is so little overhead to the check it doesn't matter that it is enabled in production kernels... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx
It's really interesting how much you guys argue for your buggy construct which you clearly never tested on a UP build... Not sure if that is a hot path, but on highly contended locks every cache line
spin_is_locked always return 0 on UP builds, and given that XFS only has !spin_is_locked asserts things will work just fine on UP builds (not the !CONFIG_SMP and !CONFIG_XFS_DEBUG would be a common c
(old thread) Perhaps assert_spin_locked() would be better - any advantages of lockdep_assert_held() don't seem to outweigh the cost of using a new interface. And I'm not sure that I buy the performan