Message ID | 20231007203543.1377452-1-willy@infradead.org (mailing list archive) |
---|---|
Headers | show |
Series | Remove the XFS mrlock | expand |
On 10/7/23, Matthew Wilcox (Oracle) <willy@infradead.org> wrote: > I'm sympathetic to "this will warn twice and dump much the same > information if you have lockdep enabled". Perhaps somebody has a > suggestion for not doing that? > Well the obvious idea is that lockdep could provide a macro indicating what's up. Then you would: static inline void rwsem_assert_held(const struct rw_semaphore *sem) { if (lockdep_works) lockdep_assert_held(sem); else __rwsem_assert_held(sem); } Am I missing something? If this is not feasible to achieve, then the proposed routines need a comment justifying the state.