From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/6] xfs: annotate functions that trip static checker locking checks
Date: Thu, 7 Nov 2019 07:47:21 -0800 [thread overview]
Message-ID: <20191107154721.GC6219@magnolia> (raw)
In-Reply-To: <20191107083158.GA6729@infradead.org>
On Thu, Nov 07, 2019 at 12:31:58AM -0800, Christoph Hellwig wrote:
> On Wed, Nov 06, 2019 at 07:02:25PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > 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@oracle.com>
> > ---
> > 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.
Will change both.
(I find both awkward, but not enough to push back all that hard. :P)
--D
next prev parent reply other threads:[~2019-11-07 15:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 3:02 [PATCH 0/6] xfs: various coverity fixes Darrick J. Wong
2019-11-07 3:02 ` [PATCH 1/6] xfs: annotate functions that trip static checker locking checks Darrick J. Wong
2019-11-07 8:31 ` Christoph Hellwig
2019-11-07 15:47 ` Darrick J. Wong [this message]
2019-11-07 3:02 ` [PATCH 2/6] xfs: fix missing header includes Darrick J. Wong
2019-11-07 8:32 ` Christoph Hellwig
2019-11-07 3:02 ` [PATCH 3/6] xfs: actually check xfs_btree_check_block return in xfs_btree_islastblock Darrick J. Wong
2019-11-07 8:34 ` Christoph Hellwig
2019-11-07 20:41 ` Darrick J. Wong
2019-11-07 3:02 ` [PATCH 4/6] xfs: null out bma->prev if no previous extent Darrick J. Wong
2019-11-07 8:41 ` Christoph Hellwig
2019-11-07 3:02 ` [PATCH 5/6] xfs: "optimize" buffer item log segment bitmap setting Darrick J. Wong
2019-11-07 8:42 ` Christoph Hellwig
2019-11-07 3:03 ` [PATCH 6/6] xfs: range check ri_cnt when recovering log items Darrick J. Wong
2019-11-07 8:42 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191107154721.GC6219@magnolia \
--to=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox