On Wed, Nov 06, 2019 at 07:02:25PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > Add some lock annotations to helper functions that seem to have > unbalanced locking that confuses the static analyzers. > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > --- > fs/xfs/xfs_log.c | 1 + > fs/xfs/xfs_log_priv.h | 5 ++++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > > diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c > index d7d3bfd6a920..1b4e37bbce53 100644 > --- a/fs/xfs/xfs_log.c > +++ b/fs/xfs/xfs_log.c > @@ -2808,6 +2808,7 @@ xlog_state_do_iclog_callbacks( > struct xlog *log, > struct xlog_in_core *iclog, > bool aborted) > + __releases(&log->l_icloglock) __acquires(&log->l_icloglock) The indentation looks really awkward. I think this should be be: bool aborted) __releases(&log->l_icloglock) __acquires(&log->l_icloglock) > +static inline void > +xlog_wait( > + struct wait_queue_head *wq, > + struct spinlock *lock) __releases(lock) > { > DECLARE_WAITQUEUE(wait, current); Same here.