lkml.org 
[lkml]   [2023]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 0/5] Remove the XFS mrlock
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.

--
Mateusz Guzik <mjguzik gmail.com>

\
 
 \ /
  Last update: 2023-10-08 22:32    [W:0.400 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site